On Thu, 22 Jun 2006, Robert wrote:
Can someone explain why this:
find . -depth -print0 | cpio --null -pmd /tmp/test
will copy all files in and below the current directory -and- this:
find . -depth -print | grep -v .iso$ | wc -l
will count all the non-iso files -and- this:
find . -depth -print | grep .iso$ | wc -l
will count *only* the iso files -but- this:
find . -depth -print0 | grep -v .iso$ | cpio --null -pmd /tmp/test
doesn't copy *anything*? Any suggestions for a work-around would also be
most welcome.
I think that passing -print0 output to grep is the culprit. How about
using find to identify the files rather than grep:
find . -depth ! -name '*.iso' -print0 | cpio ...
-- Paul Heinlein <heinlein@xxxxxxxxxx>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos