小编cst*_*ack的帖子

如何在保留文件夹结构的同时从目录中复制文件的子集?

我想将一些文件子集从 dirA 移动到 dirB(假设文件名中带有“blah”的文件),但我希望所有嵌套目录在新位置中都相同。我怎样才能做到这一点?

file-copy directory-structure

8
推荐指数
1
解决办法
3565
查看次数

为什么 find 在当前目录中查找?

我有一个/var/www/scripts/process_sounds.sh使用以下命令的 bash 脚本:

find /var/www/unprocessed_sounds/ * -type f
Run Code Online (Sandbox Code Playgroud)

它应该找到目录中的所有文件unprocessed_sounds,它确实这样做了,但它也会找到脚本目录中的所有文件(然后像处理声音文件一样处理它们,这不是我想要的)。

为什么会find返回当前目录下的东西?

find

2
推荐指数
1
解决办法
158
查看次数

标签 统计

directory-structure ×1

file-copy ×1

find ×1