1 2 3 4 5 6 7 8 9 10
#!/bin/sh if [ -f $1 ]; then echo "One moment please while we restore $1" tar xzPfU $1 -C / echo "Restore of $1 complete." else echo "Could not locate ${1}. Available backups:" ls -lah /root | grep backup | more fi