有一个线程谈论ls "*"
不显示任何文件,但我实际上想知道为什么简单
ls *
Run Code Online (Sandbox Code Playgroud)
命令除了在我的终端中不输出任何内容
ls: invalid option -- '|'
Try 'ls --help' for more information.
Run Code Online (Sandbox Code Playgroud)
尽管
ls
Run Code Online (Sandbox Code Playgroud)
将列出当前目录中的所有文件为
1 ferol readme.txt
2 fichier sarku
2018 GameShell Templates
22223333 '-|h4k3r|-' test
3 hs_err_pid2301.log test2
CA.txt important.top.secret.txt toto.text
CA.zip JavaBlueJProject tp1_inf1070
countryInfo.txt liendur 'tp1_inf1070_A19(2) (1)'
currency liensymbolique tp1_inf1070_A19.tar
curreny LOL Videos
Desktop Longueuil 'VirtualBox VMs'
Documents Music words
douffos numbers Zip.zip
Downloads Pictures
examples.desktop Public
Run Code Online (Sandbox Code Playgroud)
关于为什么通配不在这里生效的任何想法?我在 Ubuntu 上,在终端上工作,我不知道它是否有所作为。
谢谢。
1 小时前我一直在问一个关于使用 grep 命令的关于正则表达式的类似问题,如果首选的选择是在同一线程中发布,请原谅我,如果是这种情况,我下次会这样做。
它可能看起来像基本的 synthax,但我试图了解正则表达式识别模式的工作原理,我得到的结果似乎与我正在阅读的手册相矛盾(我很可能没有正确解释材料)。
文件包含以下单词列表:
mael@mael-HP:~/repertoireVide$ cat MySQLServ
remembré
emmuré
emmené
dilemmes
jumeaux
écrémage
emmena
emmailloter
flemmard
Run Code Online (Sandbox Code Playgroud)
以下命令给出了输出
mael@mael-HP:~/repertoireVide$ grep -r 'emm*[a-f].[^ta]$'
MySQLServ:remembré
MySQLServ:emmené
MySQLServ:flemmard
Run Code Online (Sandbox Code Playgroud)
我想知道为什么grep
不匹配“emmailloter”这个词,因为“emmailloter”:
谢谢。
我创建了一个空目录,并在终端中执行以下操作
mael@mael-HP:~/repertoireVide$ mkdir -p a/b/c
mael@mael-HP:~/repertoireVide$ mkdir -p a/a/b
mael@mael-HP:~/repertoireVide$ mkdir -p b/a
mael@mael-HP:~/repertoireVide$ echo "c" > a/c
mael@mael-HP:~/repertoireVide$ echo "c" > c
Run Code Online (Sandbox Code Playgroud)
树显示以下 mael@mael-HP:~/repertoireVide$ 树
.
??? a
? ??? a
? ? ??? b
? ??? b
? ? ??? c
? ??? c
??? b
? ??? a
??? c
7 directories, 2 files
Run Code Online (Sandbox Code Playgroud)
为什么下面的find命令输出这个
mael@mael-HP:~/repertoireVide$ find .
.
./a
./a/a
./a/a/b
./a/c
./a/b
./a/b/c
./c
./b
./b/a
Run Code Online (Sandbox Code Playgroud)
是不是find
只是想指定目录内查找文件,按照man find
:
find - search …
Run Code Online (Sandbox Code Playgroud)