Re: move/copy file by extension preserving directories hierarchy.
В Wed, 22 Oct 2014 17:07:19 -0700 Mike Smithson mdooli...@gmail.com пишет: tar cvf test.tar $(find /path/to/dir -name '*.png') then move the test.tar where you want, and un-tar it. I suggest following example: cd /path/to/src find -name '*.png' -print0 | tar -cf- --null -T- | \ tar -xf- -C /path/to/dst This example correctly preserve directory structure and process files/dirs with spaces in names. -- WBR, Andrey Tataranovich ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
move/copy file by extension preserving directories hierarchy.
I don't know if it has benn already asked, but it could be a nice feature the possibility to move/copy files recursively by extension preserving the directory structure. I'll better explain by an example: src dir | +- sub dir 1 | +- file1.png | +- file1.jpeg | +- sub dir 2 +- file2.png +- file2.jpeg command: move_by_ext *.pngsrc_dir dest_dir dest dir | +- sub dir 1 | +- file1.png | +- sub dir 2 +- file2.png Thanks in advance Daniele Giglio ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: move/copy file by extension preserving directories hierarchy.
On Wed, 22 Oct 2014 15:25:27 -0700, tizio incognito jeeg...@yahoo.it wrote: I don't know if it has benn already asked, but it could be a nice feature the possibility to move/copy files recursively by extension preserving the directory structure. I'll better explain by an example: src dir | +- sub dir 1 | +- file1.png | +- file1.jpeg | +- sub dir 2 +- file2.png +- file2.jpeg command: move_by_ext *.pngsrc_dir dest_dir dest dir | +- sub dir 1 | +- file1.png | +- sub dir 2 +- file2.png Thanks in advance Daniele Giglio I say this is a job for the F2 menu. That's where you can get all picky and funny with stuff like this. I have never once required this nitpicking of directory contents in 20 years of using mc, but I have many other bizarre scripts that do oddball things like this that I personally require all the time, so I'll give you a hint: tar cvf test.tar $(find /path/to/dir -name '*.png') then move the test.tar where you want, and un-tar it. -- Peace and Cheer ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc