在window系统启动 filebeat head 命令 问题
window 系统可以使用什么命令替代,head
window 系统可以使用什么命令替代,head
2017-12-01
windows 下可以替代 head 的命令是 gc
https://stackoverflow.com/questions/9682024/how-to-do-what-head-tail-more-less-sed-do-in-powershell
gc log.txt | select -first 10 # head
gc -TotalCount 10 log.txt # also head
gc log.txt | select -last 10 # tail
gc -Tail 10 log.txt # also tail (since PSv3), also much faster than above option
gc log.txt | more # or less if you have it installed
gc log.txt | %{ $_ -replace '\d+', '($0)' } # sed
举报