tail
Display the last part of a file. See also: head. More information: <https://www.gnu.org/software/coreutils/tail>.
Install
- All systems
-
curl cmd.cat/tail.sh
- Debian
-
apt-get install coreutils - Ubuntu
-
apt-get install coreutils -
Alpine
-
apk add coreutils - Arch Linux
-
pacman -S coreutils - Kali Linux
-
apt-get install coreutils - CentOS
-
yum install coreutils - Fedora
-
dnf install coreutils - Windows (WSL2)
-
sudo apt-get updatesudo apt-get install coreutils - OS X
-
brew install coreutils - Raspbian
-
apt-get install coreutils - Docker
-
docker run cmd.cat/tail tailpowered by Commando
Display the last part of a file. See also: head. More information: <https://www.gnu.org/software/coreutils/tail>.
-
Show last 'count' lines in file:
tail --lines count path/to/file -
Print a file from a specific line number:
tail --lines +count path/to/file -
Print a specific count of bytes from the end of a given file:
tail --bytes count path/to/file -
Print the last lines of a given file and keep reading file until `Ctrl + C`:
tail --follow path/to/file -
Keep reading file until `Ctrl + C`, even if the file is inaccessible:
tail --retry --follow path/to/file -
Show last 'num' lines in 'file' and refresh every 'n' seconds:
tail --lines count --sleep-interval seconds --follow path/to/file
© tl;dr; authors and contributors