Windows type (end of file / logs) equivalent in Linux
Shows the last N lines of a file. With -f, follows the file in real-time — essential for watching logs.
type (end of file / logs)
tail
tail
tail
Overview
What this command does
On Windows, "type (end of file / logs)" is used to display the last lines of a file. On Linux, the closest practical mapping shown here is "tail". Shows the last N lines of a file. With -f, follows the file in real-time — essential for watching logs. This reference is grouped under Text Processing.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows type (end of file / logs) maps to tail for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux command-line basics.
Practical tasks
Common use cases
Display the last lines of a file
Shows the last N lines of a file. With -f, follows the file in real-time — essential for watching logs.
tail file.txt
Last 10 lines (default)
tail -n 50 file
Last 50 lines
tail -f file.log
Follow live (Ctrl+C to stop)
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
tail /var/log/syslog
tail -n 100 error.log
tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/*.log
Walkthrough
Examples with explanations
# No direct Windows CMD equivalent
tail /var/log/syslog # last 10 lines
tail -n 100 error.log # last 100 lines
# Watch a log in real-time:
tail -f /var/log/nginx/access.log
# Follow multiple files:
tail -f /var/log/nginx/*.log
Reference
Common options and variations
| Command or option | Use |
|---|---|
tail file.txt | Last 10 lines (default) |
tail -n 50 file | Last 50 lines |
tail -f file.log | Follow live (Ctrl+C to stop) |
tail -f f1.log f2.log | Follow multiple log files |
tail -n +2 file.csv | All lines except the first (skip header) |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "tail" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | tail |
Same command on this distribution. |
| Fedora | same command | tail |
Same command on this distribution. |
| Arch | same command | tail |
Same command on this distribution. |
Keep learning