SSH tail command

Using SSH you can look at the last lines of a file in a Linux environment. This can be done using the Linux tail command. In this article, we’ll show the basic usage of tail and how to use it with SSH.

Show last 10 lines of a file using tail and SSH

tail myTextFile.txt

Showing the last n lines using Linux tail command

Here you should replace n with the number of lines you wish to see

tail -n myTextFile.txt

Watch a file with Linux tail command

This will make tail refresh and display any changes made to the file. It’s useful when watching logs, waiting for an event to occur

tail -F myTextFile.txt
  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

SSH ip command

If you wish to obtain information about your server’s IP on a Linux machine using SSH you can use...

SSH rm command

If you wish to remove a file or folder from your Linux system you can use SSH rm command. In this...

SSH echo command

One of the most useful commands in a Linux environment is echo. With it, you can provide output...

SSH history command

If you wish to find what commands you have previously executed in a Linux environment you can use...

SSH cd command

SSH cd command is mainly used to navigate in your Linux environment. In this article, we’ll show...

Powered by WHMCompleteSolution