Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更多实用命令 #5

Open
ghost opened this issue Jan 31, 2021 · 4 comments
Open

更多实用命令 #5

ghost opened this issue Jan 31, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 31, 2021

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

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

@huntagain2008
Copy link

lsof命令找不到
[lsof 命令的用法很简单:lsof /path/to/device/node,或者 lsof /path/to/mount/point]
这里我按教程装的Arch Linux找不到lsof这个命令。
虽然都说Arch Linux文档很全。可是小白我连lsof怎么装都不知道。
Windows11的wsl Ubuntu倒是自带lsof

@ghost
Copy link

ghost commented Aug 11, 2021

@huntagain2008 pacman -S lsof

@shikaij
Copy link

shikaij commented Mar 2, 2024

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

@shikaij
Copy link

shikaij commented Mar 2, 2024

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

grep '[tf]' file1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants