views:

2495

answers:

12

Hi,

The tail command on the DOS does not seem to be recognized on my XP. Any suggestions on printing last few lines on a very big log file on DOS.

Thanks Arun

+4  A: 

Does this help?

http://malektips.com/xp_dos_0001.html

http://commandwindows.com/server2003tools.htm

Here is the direct Microsoft link.

I have tested it on my machine (just out of curiosity and because I might need it) and it works fine.

johnny
nopes. thanks. i tried this :)
arun.poruri
Why does it fail? What happens? According to these sites it works like a charm, but I admit I have not tried them.
johnny
Just downloaded and installed from Microsoft and it works.
johnny
+3  A: 

Download the tail command from Microsoft itself.

cartman
Don't you find it strange how the link looks like it would be pointing to Microsoft, but it isn't? :)
Tomalak
It needs some handholding :)
cartman
+3  A: 

If you install Cygwin, you can get all the warm and fuzzy Linux commands you are used to.

Cygwin is not an emulation layer, it simply provides win32 binaries of common utilities. It does give you a bash shell which is very nice.

Kekoa
thanks. its just so painful that i have to go installing cygwin on any machine i touch... just to check the log. :)
arun.poruri
The Microsoft tools work. What error do you get?
johnny
I think you can just grab a tail.exe from Cygwin, and run that on its own.
Kekoa
Of course, cygwin IS an emulation layer. If you don't want the Cygwin bloat, take a look at MSYS instead.
anon
Cygwin *is* an emulation layer, or rather a compatibility layer. It's a DLL that implements Unix API stuff so that you can compile Unix apps to run on Windows. It's also a collection of Unix apps compiled against, and shipped with, said DLL.
Adam Jaskiewicz
Exactly. An emulator is different from adding an API. It's not like the bytecode of the app is run through a cygwin emulator, as running an SNES ROM would be. Cygwin may provide a framework that "emulates" a *nix system , but it is not an emulator. That's what I was really trying to say. I'll be more careful with my words next time!
Kekoa
+3  A: 

DOS has no tail command; you can download a Windows binary for GNU tail and other GNU tools here.

Tomer Gabel
+7  A: 

There actually is tail for XP, It's just that Microsoft doesn't install it with the standard version of XP; they packaged it in 'Windows Server 2003 Resource Kit Tools'.

You can get it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

Matt Poush
A: 

dos's type works like *nux's cat, though just like cat, it does dump the whole file, so its not really a true tail, but its going to be available in a pinch without downloading/installing a true tail substitute.

Uberfuzzy
+2  A: 

Grab the win32 port of the gnu tools from http://gnuwin32.sourceforge.net/ You'll have a wonderfully working tail -f then. Works on my XP anyway.

devSolo
It doesn't work on the server I just tried on - complains about invalid file descriptors.
David Fraser
+4  A: 

Another option would be to install MSYS (which is more leightweight than Cygwin).

0xA3
+2  A: 

With Windows PowerShell you can use:

Get-Content <file> -Wait
OscarRyz
Nice... thanks!
Don Cote
+1  A: 

I recommend the GNUWin32 utilities over CygWin. They are more "corporate IT friendly". i.e. All the tools are native windows applications that don't require you to install the a dll. (they can be run off a thumb drive or cd without any installation) They are also easier to remove (just delete the folder.) Functionally, the command line tools are indistinguishable from the cygwin versions.

You can find tail in the Core Utils for Windows package.

Chris Nava
A: 

you can try WinTail as well http://www.baremetalsoft.com/wintail/

GJ