ArchLinuxStudio / ShellTutorialComments

⭐存储Linux Shell教程的评论⭐
Creative Commons Attribution Share Alike 4.0 International
0 stars 0 forks source link

更多实用命令 #5

Open ghost opened 3 years ago

ghost commented 3 years ago

https://archlinuxstudio.github.io/ShellTutorial/#/commandLine/more_command

Linux命令行与Shell脚本教程 包含常见命令行使用,Bash基础、高级编程,以及实用范例!

huntagain2008 commented 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

ghost commented 3 years ago

@huntagain2008 pacman -S lsof

shikaij commented 7 months ago

为什么我在zsh shell 无法使用grep [tf] file1?

shikaij commented 7 months ago

问了一下gpt,在zsh shell中,[和]是通配符,而不是正则表达式的一部分。因此,当您尝试使用类似正则表达式的字符集(例如[tf])时,zsh会尝试将其解释为通配符,而不是正则表达式。可以将模式用引号括起来,以避免shell解释。

grep '[tf]' file1