Windows equivalent of the 'tail' command

前端 未结 21 3042
长情又很酷
长情又很酷 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:36

    I have not tried extracting a range, but I was able to get a line using the following DOS command:

    find /N " " *.log|find "[6]" 
    

    Since most files contain spaces, this command pulls every line from all LOG files and basically numbers them starting from 1 for each file. The numbered results are then piped into the second FIND command which looks for the line tagged as number 6.

提交回复
热议问题