Tail is a Windows Server 2003 Resource Kit command, which is used from command prompt to print the last ‘N’ lines of a text file. This article covers the Resource Kit’s tail.exe, not a built-in Windows 11 or Windows 10 command.
Windows Resource Kit download
Tail was distributed with the Windows Server 2003 Resource Kit Tools. The original Microsoft download page is no longer available. The Windows Resource Kit download notes describe the old package and link to a separately hosted copy; this is not a current Microsoft download.
If you already have the tools installed, look for tail.exe in the installation directory, such as C:\Program Files\Windows Resource Kits\Tools. The examples below assume that directory is on PATH, or that you are running them from that directory.
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
Examples:
To print the last 10 lines of the file data.txt:
tail -10 data.txt
If the file path contains spaces, put it in quotes:
tail -10 "C:\Logs\Application log.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].
The link to download the tail cmd does not work anymore
Thank for pointing that out. Updated with the link that is working.
Where can I download Windows resource kit ?
From this page – https://www.technlg.net/windows/download-windows-resource-kit-tools/. (It was not working earlier, but has been updated)
https://www.technlg.net/windows/download-windows-resource-kit-tools/
The above link works now.
Tail gives ambiguous result.
Sometimes right result and sometimes wrong result.
See Below
When I call this
tail -ftoolkit command from perl on a windows 7 platform, the output is displayed in a command window and cannot, so far as I can tell, be captured in the perl program. Has anyone had success in capturing its output in the calling program?Thanks;
Thanks … note, that for Windows 7, install it with compatibility mode setting and it should install perfectly fine. It pops up a message saying there are known compatibility issues, ignore and proceed. Tried and tested and works absolutely fine on Win 7 (64 bit) Ultimate.
Where can I download tail command for vista/Windows 7? Does the 2k3 resource kit tail.exe work for these versions also?