Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有(linux/unix)
/directory/1/file.wmv /directory/2/file.wmv /directory/3/file.wmv
我想将这些 .wmv 文件复制到单个目录 /example/ 中,文件以它们所在的目录名称命名,例如 1.wmv、2.wmv、3.wmv、
for i in {1..10} do cp /directory/$i/file.wmv /example/$i.wmv done