【发布时间】:2013-01-03 21:13:04
【问题描述】:
可能重复:
Looking for a windows equivalent of the unix tail command
Windows equivalent of the 'tail' command
我需要存储一个巨大(数 GB)XML 文件的前 100 行和最后 100 行。在 *nix 上,我会这样做:
head -n 100 foo.xml > foo.txt
tail -n 100 foo.xml >> foo.txt
如何在 Windows/DOS 命令提示符下执行相同操作?
注意:我宁愿不必安装任何东西。
【问题讨论】:
-
@RobertHarvey 有什么方法可以在不安装任何东西的情况下获得
tail? -
我对此表示怀疑。
head和tail似乎是过滤器(如 DOS 的more过滤器),而不是 DOS 命令。 -
@RobertHarvey 不一定是
tail命令,只是那个功能。
标签: windows windows-7 dos command-prompt