Tail is a Windows Resource kit command, which is used from command prompt to print last ‘n’ lines of any text file. Default is 10 lines.
Download:
https://www.microsoft.com/downloads/en/confirmation.aspx?familyId=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displayLang=en
tail is commonly installed in folder
C:\Program Files\Windows Resource Kits\Tools
Syntax / Help
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 7 lines of the file data.txt:
tail -7 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].
No comments:
Post a Comment