2013-01-03 44 views
0

可能重複:
Looking for a windows equivalent of the unix tail command
Windows equivalent of the 'tail' command* nix頭部和尾部命令的Windows/DOS相當於什麼?

我需要存儲的第一個和最後100線極大的相(多千兆字節)的XML文件。在* nix上,我只會這樣做:

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

我該如何從Windows/DOS命令提示符執行相同操作?

注意:我寧願不必安裝任何東西。

+1

http://stackoverflow.com/q/187587 –

+2

http://stackoverflow.com/q/1295068 –

+0

@RobertHarvey有沒有什麼辦法讓'tail'沒有安裝任何東西? – Matt

回答

1

一個選項是安裝cygwin,它帶有所有基本的Unix命令行工具,如headtail