Study the tar and the gzip commands. These connamds are the UNIX (Linux) version of pkzip or arj in Dos.
Write a script which backups you’re home directory into one compressed file in a subdirectory called backup of you’re home directory.
If you like you can study at and/or cron(tab) to schedule a daily or weekly backup of you’re home directory in one file.
我的答案:
#!/usr/local/bin/bash
CURRENTIME=`date “+%Y%m%d%H%M%S”`
if test ! -e ~/backup
then
mkdir ~/backup
fi
tar zcvf ~/backup/$CURRENTIME.tar.gz ~ –exclude=backup