Windwos PowerShell의 Get-Content명령으로 Linux 명령 tail -f 를 모방하기

PowerShell

Windows에서 유닉스의 tail -f 명령과 같은 결과를 얻는 명령을 사용하고 싶다면 다음과 같이 Windows PowerShell 앱을 사용합니다. 유닉스의 tail -f 명령은 지정한 파일의 내용이 추가될 때마다 표시합니다.

스폰서 링크

Linux 예

$ tail -f  /var/log/apache2/yyyymmdd_access.log

Windows PowerShell 예

PS C:\> Get-Content -Wait -Encoding UTF8 -Tail 10 -Path C:\app\apache2\httpd\logs\yyyymmdd_access.log
제목과 URL을 복사했습니다