【发布时间】:2013-01-11 04:40:50
【问题描述】:
我有一个程序将文件提取到一系列子文件夹中,每个子文件夹都有一个“标题”子文件夹。例如:
/share/Videos/Godfather.Part.1
/share/Videos/Godfather.Part.1/<packagename>
/share/Videos/Godfather.Part.1/<packagename>/Godfather.avi
/share/Videos/Godfather.Part.2
/share/Videos/Godfather.Part.2/<packagename>
/share/Videos/Godfather.Part.2/<packagename>/Godfather2.avi
我想把指定文件夹<packagename>中的文件上移一个目录,这样文件结构如下:
/share/Videos/Godfather.Part.1
/share/Videos/Godfather.Part.1/Godfather.avi
/share/Videos/Godfather.Part.2
/share/Videos/Godfather.Part.2/Godfather2.avi
如何在 bash 命令行中完成这项任务?请注意,这是一个使用 2 个文件夹的示例,我有 100 个这样的文件夹。
【问题讨论】: