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 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

Linux tar Command

The Linux tar command is used to compress and extract files to and from an archive. In this...

How to Install WordPress via SSH

Since WordPress is the most widely used CMS it’s installation process has been made as simple and...

SSH Execute Command on a Remote server

Via SSH you can connect to a remote server’s shell. This will allow you to execute commands on...

How to connect to your shared hosting account via SFTP with FileZilla

SFTP is a convenient way to use SSH, while also using the interface of a simple FTP. In order to...

SSH netstat command

If you wish to debug or track statistics of your network in a Linux environment you can use SSH...