Open ghost opened 3 years ago
lsof命令找不到 [lsof 命令的用法很简单:lsof /path/to/device/node,或者 lsof /path/to/mount/point] 这里我按教程装的Arch Linux找不到lsof这个命令。 虽然都说Arch Linux文档很全。可是小白我连lsof怎么装都不知道。 Windows11的wsl Ubuntu倒是自带lsof
@huntagain2008 pacman -S lsof
为什么我在zsh shell 无法使用grep [tf] file1?
问了一下gpt,在zsh shell中,[和]是通配符,而不是正则表达式的一部分。因此,当您尝试使用类似正则表达式的字符集(例如[tf])时,zsh会尝试将其解释为通配符,而不是正则表达式。可以将模式用引号括起来,以避免shell解释。
grep '[tf]' file1
https://archlinuxstudio.github.io/ShellTutorial/#/commandLine/more_command
Linux命令行与Shell脚本教程 包含常见命令行使用,Bash基础、高级编程,以及实用范例!