Created
November 7, 2018 16:02
-
-
Save farkasmate/1ca5d805a1fe4531c504d0a9dd5f8653 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ $# != 1 ] | |
| then | |
| echo "Usage: $(basename $0) <backup.cpio.gz>" | |
| exit 1 | |
| fi | |
| dir="restored-$(basename $1)" | |
| mkdir $dir | |
| cat $1 | gunzip --to-stdout | cpio --extract --quiet --no-absolute-filenames --make-directories --directory $dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment