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.
我在我的 PC 上使用 cygwin,我希望将 /pictures/ (和子目录)中的所有 .nef 文件移动到一个新目录中,但我想保留 nef 文件来自的目录名称。
即 /pictures/vacation2012/image01.nef 和 /pictures/vac09/image01.nef
应该进入
/pictures/nef/vac09/ 和 /pictures/nef/vacation2012/
你可以这样做:
$ cd from_directory $ (tar cf - `find . -name "*.nef"`) | (cd to_directory; tar xf - ) $ find . -name "*.nef" -exec rm -rf {} \; # be careful with this...