linux - 在 linux 中使用 bash 查找文件夹中的所有音频文件

标签 linux bash find ls

当我在 ls 命令中使用通配符时,它起作用了。

$ ls '*.{mp3,ogg}'  # Showing only two formats in the command
cannot access *.mp3: No such file or directory
1.ogg 2.ogg 3.ogg

但是使用查找命令不起作用

$ find ~ -iname '*.{mp3,ogg}'

行中有什么错误?

最佳答案

我认为这对你有用

   find ~ -name "*.mp3" -o -name "*.ogg"

-o 相当于 bool 值 or

关于linux - 在 linux 中使用 bash 查找文件夹中的所有音频文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11928440/

相关文章:

linux - 我在 sed 中不断收到意外标记 `/bin/busybox.exe' 错误。我该如何解决这个问题?

bash - 为什么找不到 imagemagick mogrify 命令以及如何解决这个问题?

linux - wget 使用环境变量

linux - 如何在 Linux 中使用 awk/sed 或其他命令删除某些字符串?

bash - 连接 find -print0 和 xargs -0

java - openfire 错误没有答案

linux - 安装 MongoDB Hadoop 驱动程序时出错

java - 跨平台使用带目录的程序

jquery - 在 jQuery 中, "find(' > span')"是做什么的?

linux - 在linux中查找30天未读的文件