[TriLUG] cpio vs cp (was: Re: Locked Out Linux box (Update))
Paul Boyle via TriLUG
trilug at trilug.org
Fri Oct 20 17:09:25 EDT 2017
Hi Brian,
On Fri, 20 Oct 2017 16:40:11 -0400
Brian via TriLUG <trilug at trilug.org> wrote:
> On 10/20/2017 04:08 PM, Paul Boyle via TriLUG wrote:
> > find . -depth -print0 | cpio --null -pmvd <external storage device>
>
> So, here's a n00bish question from a not-so-n00by user:
>
> What makes "find . [...] | cpio -p [...] <dest>" better than "cp -pr
> * <dest>" ?
Honestly, I dunno. I've been using the find/cpio combo since I don't
remember when. I do know that the -print0 and --null combo handle
filenames with spaces or other potentially problematic characters
without a problem. Maybe someone else could give you a better answer.
Paul
--
Paul D. Boyle, Ph. D.
Manager, X-ray Facility
Department of Chemistry
Western University
London, ON N6A 5B7
Canada
GPG Fingerprint: 8ECE 516D 9046 FE83 4A46 7E8E D720 555D 8CC3 EC6B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://www.trilug.org/pipermail/trilug/attachments/20171020/653b34c4/attachment.pgp>
More information about the TriLUG
mailing list