发现在linux使用bash文件夹中的所有音频文件 [英] find all audio files in a folder using bash in linux

查看:168
本文介绍了发现在linux使用bash文件夹中的所有音频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用通配符 LS 命令,它的工作原理。

When I am using wildcards with ls command, it works.

$ 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命令不能正常工作

but using find command doesn't work

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

什么是在该行的错误?

What is the error in the line?

推荐答案

我认为这应该为你工作。

I think this should work for you

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

-o相当于布尔

这篇关于发现在linux使用bash文件夹中的所有音频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆