Re: move/copy file by extension preserving directories hierarchy.
- From: Andrey Tataranovich <tataranovich gmail com>
- To: mc gnome org
- Subject: Re: move/copy file by extension preserving directories hierarchy.
- Date: Thu, 23 Oct 2014 10:02:34 +0300
В Wed, 22 Oct 2014 17:07:19 -0700
"Mike Smithson" <mdooligan 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]