在Linux中执行文件操作时如何排除文件夹,例如cp,mv,rm和chown等(How do I exclude a folder when performing file operati i.e. cp, mv, rm and chown etc. in Linux)
如何在执行文件操作时排除文件夹,例如cp等。
我目前使用通配符*将文件操作应用于所有文件,但我需要排除一个文件夹。
我实际上想要使用的命令是更改目录中所有文件的所有者,但我需要排除一个子目录。
How do you exclude a folder when performing file operati cp etc.
I would currently use the wild card * to apply file operation to all, but I need to exclude one single folder.
The command I'm actually wanting to use is chown to change the owner of all the files in a directory but I need to exclude one sub directory.
最满意答案
如果您使用bash并通过shopt -s extglob启用extglob,那么您可以使用!(<pattern>)来排除给定的模式。
If you're using bash and enable extglob via shopt -s extglob then you can use !(<pattern>) to exclude the given pattern.
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
上一篇:Ejabberd将应用程序逻辑与后端结合在一起(Ejabberd couples application logic with backends)
下一篇:将文档从视图复制到其他数据库并将其删除(Copy documents from a view to other database and remove it)
推荐阅读
留言与评论(共有 13 条评论) |
本站网友 沈殿霞鬼片 | 0秒前 发表 |
但我需要排除一个文件夹 | |
本站网友 同学的母亲 | 30分钟前 发表 |
mv | |
本站网友 碧桂园金沙滩 | 12分钟前 发表 |
but I need to exclude one single folder. The command I'm actually wanting to use is chown to change the owner of all the files in a directory but I need to exclude one sub directory. 最满意答案 如果您使用bash并通过shopt -s extglob启用extglob | |
本站网友 圭贤 | 28分钟前 发表 |
mv | |
本站网友 章丘租房网 | 21分钟前 发表 |
我目前使用通配符*将文件操作应用于所有文件 | |
本站网友 八方论坛 | 4分钟前 发表 |
If you're using bash and enable extglob via shopt -s extglob then you can use !(<pattern>) to exclude the given pattern. | |
本站网友 酬和 | 28分钟前 发表 |
rm and chown etc. in Linux) 如何在执行文件操作时排除文件夹 | |
本站网友 三七胶囊 | 5分钟前 发表 |
但我需要排除一个文件夹 | |
本站网友 力明科技职业学院 | 4分钟前 发表 |
rm and chown etc. in Linux) 如何在执行文件操作时排除文件夹 | |
本站网友 世界上最有效的减肥方法 | 18分钟前 发表 |
How do you exclude a folder when performing file operati cp etc. I would currently use the wild card * to apply file operation to all | |
本站网友 delphi源码 | 5分钟前 发表 |
我目前使用通配符*将文件操作应用于所有文件 | |
本站网友 娘惹菜 | 15分钟前 发表 |
If you're using bash and enable extglob via shopt -s extglob then you can use !(<pattern>) to exclude the given pattern. |