This script will tar and compress the files in the specified directory which is located beneath the current directory,
#!/bin/bash
# usage: bu dir
tar cvf $1.tar $1a
bzip2 $1.tar
mv $1.tar.bz2 mybackups
echo "$1 backed up."
$ bu src
src backed up.
$ ls mybackups
src.tar.bz2
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment