1

Possible Duplicate:
Looking for a windows equivalent of the unix tail command
Windows equivalent of the 'tail' command

I need to store the first and last 100 lines of a ginormous (multi-gigabyte) XML file. On *nix, I would simply do this:

head -n 100 foo.xml > foo.txt
tail -n 100 foo.xml >> foo.txt

How can I do the same from a Windows/DOS command prompt?

NOTE: I would prefer not to have to install anything.

Community
  • 1
  • 1
Matt
  • 21,026
  • 18
  • 63
  • 115

1 Answers1

1

One option is to install cygwin, it comes with all the basic Unix command line tools like head and tail.

piokuc
  • 25,594
  • 11
  • 72
  • 102