eXp*_*oIt 2 powershell powershell-3.0
我已经为我正在运行的许多基本脚本启用了日志,我需要不时清除这些日志.
在PowerShell中从日志文件中删除前N行的最有效方法是什么?
你可以尝试Skip参数Select-Object
Get-Content logfile.log | Select-Object -Skip 10 | Out-File clearedLogfile.txt
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2284 次 |
| 最近记录: |