Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To create a gzip-compressed archive using find, cpio, and gzip, you can use the following command:
- find . | cpio -o | gzip > archive.cpio.gz
- Explanation:
- 1. find .: Lists all files and directories starting from the current directory (.).
- 2. cpio -o: Takes the list of files from find and creates an archive in the cpio format (-o means “create archive”).
- 3. gzip: Compresses the cpio archive.
- 4. >: Redirects the compressed data to a file named archive.cpio.gz.
- To extract the archive:
- gunzip -c archive.cpio.gz | cpio -id
- • gunzip -c: Decompresses the file but writes the output to stdout.
- • cpio -id: Extracts files from the archive. (-i means “extract”, and -d creates directories as needed).
- Let me know if you need additional details!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement