Tail is Windows Resource kit command, which is used from command prompt to print last ‘N’ lines of any text file.
Download tail command
Firstly download Windows resource kit from here
Open the downloaded file. It installs the tools in the default directory
C:\Program Files\Windows Resource Kits\Tools
Tail command usage
C:\Program Files\Windows Resource Kits\Tools>tail.exe /? usage: TAIL [switches] [filename]* switches: [-?] display this message [-n] display last n lines of each file (default 10) [-f filename] keep checking filename for new lines
To print the last 10 lines of the file data.txt:
tail -10 data.txt
To print the data as and when it’s added to the file:
tail -f data.txt
The above command is mostly used for viewing log files contents while more data is being written to them. Tail command with -f option does not terminate until the user presses [Ctrl]-[C].