相关疑难解决方法(0)

为什么命令“ls *”会产生关于无效选项的错误?

有一个线程谈论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 上,在终端上工作,我不知道它是否有所作为。

谢谢。

linux ls wildcards

37
推荐指数
1
解决办法
6928
查看次数

“du -sh *”和“du -sh ./*”有什么区别?

du -sh *和 和有du -sh ./*什么区别?

注意:我感兴趣的是*./*部分。

shell bash options filenames wildcards

29
推荐指数
2
解决办法
3万
查看次数

标签 统计

wildcards ×2

bash ×1

filenames ×1

linux ×1

ls ×1

options ×1

shell ×1