tar Command
Thursday, December 20, 2007
tar a file and then copy it / untar in a new folder
# cd /source/directory
# tar cf - . |(cd /destination/dir; tar xvfBp -)
tar command with exclude
# tar cvf /apache.tar --exclude=/var/apache/htdocs/docu/patch/*.zip \
> --exclude=/var/apache/htdocs/docu/iplanet/*.gz /var/apache/htdocs/docu
# tar cvf /os.tar --exclude=/var --exclude=/usr --exclude=sys / Note: not working to backup OS
# cd /source/directory
# tar cf - . |(cd /destination/dir; tar xvfBp -)
tar command with exclude
# tar cvf /apache.tar --exclude=/var/apache/htdocs/docu/patch/*.zip \
> --exclude=/var/apache/htdocs/docu/iplanet/*.gz /var/apache/htdocs/docu
# tar cvf /os.tar --exclude=/var --exclude=/usr --exclude=sys / Note: not working to backup OS
