我注意到,当Get-Content path/to/logfile -Wait文档解释它应该时,输出实际上不会每秒刷新一次.如果我将Windows资源管理器转到日志文件所在的文件夹并刷新文件夹,则会Get-Content将最新更改输出到日志文件.
Get-Content path/to/logfile -Wait
Get-Content
如果我tail -f在同一个日志文件上尝试使用cygwin(不是在尝试的同时get-content),那么它会像人们期望的那样尾巴,在没有我必须做任何事情的情况下刷新实时.
tail -f
get-content
有谁知道为什么会这样?
powershell powershell-3.0
powershell ×1
powershell-3.0 ×1