当我打开终端并运行 WSL 时,显示以下错误:

The file cannot be accessed by the system.
[process exited with code 1 (0x00000001)]
Run Code Online (Sandbox Code Playgroud) 我有一个很大的日志文件(.log)。我试图找到一些需要突出显示的关键字,以便我可以更快地跳过日志中的其他行。但是,我不想只过滤选择字符串,而是突出显示选择字符串。另外,我对Powershell一无所知,到目前为止,我通过谷歌搜索得到了以下命令。
C:\users\proto> cat txtlog.log select-string "Valid" | write-host -foregroundcolor red
Run Code Online (Sandbox Code Playgroud)
它不会输出我想要的内容,因为它只返回红色的“有效”行,而不返回其他行。
windows ×2
command-line ×1
directx ×1
powershell ×1
ubuntu ×1
windows-10 ×1
windows-subsystem-for-linux ×1
wsl2 ×1