▲ | fullstop 4 days ago | |||||||
I have so much of tar memorized. cpio is super funky to me, though. | ||||||||
▲ | fuzztester 3 days ago | parent [-] | |||||||
cpio is not that hard. A common use case is:
See:
and here is an example from its Wikipedia page, under the "Operation and archive format" section, under the Copy subsection:Copy Cpio supports a third type of operation which copies files. It is initiated with the pass-through option flag (p). This mode combines the copy-out and copy-in steps without actually creating any file archive. In this mode, cpio reads path names on standard input like the copy-out operation, but instead of creating an archive, it recreates the directories and files at a different location in the file system, as specified by the path given as a command line argument. This example copies the directory tree starting at the current directory to another path new-path in the file system, preserving files modification times (flag m), creating directories as needed (d), replacing any existing files unconditionally (u), while producing a progress listing on standard output (v): $ find . -depth -print | cpio -p -dumv new-path | ||||||||
|