Windows equivalent of the 'tail' command

前端 未结 21 2950
长情又很酷
长情又很酷 2020-11-28 01:48

Is there a way to simulate the *nix tail command on the Windows command line? I have a file and I want a way to snip off the first n lines of text. For example:

21条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 02:31

    This is a total hack but if it's a huge file that you want to just examine the format, header, etc. and you're looking for a solution you can always just redirect the 'more' output to a new file and CTRL-C quickly. The output rows can't be controlled precisely and you will most likely kill it in the middle of a line of output but it's a cheap way of grabbing a small bit of an otherwise unusable file.

    Ex.

    C:\more test.csv > test.txt 
    ^C C:\more test.txt
    line 1
    line 2
    etc...... C:\

提交回复
热议问题