如何使用Windows的tail代替命令?
- By : Will
 - Category : Windows
 - Tags: PowerShell
 
        
                    Windows                     
                
                            1 前言
一个问题,一篇文章,一出故事。
最近笔者通过SSH使用Windows的PowerShell遇到一个文档需要读取,于是整理此文。
2 最佳实践
2.1 全文件遍历
Get-Content xxx.log
2.2 读取最后10行
Get-Content -Tail 10 xxx.log
2.3 读取并监视文件更新
Get-Content -Tail 10 -Wait xxx.log
参阅文档
=================
https://www.middlewareinventory.com/blog/powershell-tail-file-windows-tail-command/
                        
                        
没有评论