【发布时间】:2015-08-21 08:39:11
【问题描述】:
我想将一个文件复制到多个目录中。我的路径结构如上。
folder1-> anotherfolder -> **here I want to copy my file**
folder2-> anotherfolder -> **here I want to copy my file**
folder3-> anotherfolder -> **here I want to copy my file**
folder4-> anotherfolder -> **here I want to copy my file**
文件夹 1,2,3,4 位于同一目录中。但是名称是文件夹不是顺序的。
我可以使用此代码获取文件夹的名称,但之后我不知道如何进入文件夹并复制我的文件。
for d in */ ; do
echo "$d"
done
此代码为我提供了目录中的文件夹名称。完成此步骤后,如何进入文件夹并复制我的文件?
【问题讨论】:
标签: linux bash unix directory directory-structure