it will check size,time,file present or not
Sample Output
size is differ
Mod time differs
Not found in archive >> backup.tar doesn't contain the fileNo such file or directory >> backup.tar file it has file but not persent in source file
Syntax
#tar -dvf Backup.tar sourceDirectory*
#tar -dvf rhel5.tar rhel5/*
-d Difference
-v verbose
-f user Archive.
1)Our present working directory it should be current directory of source file
Example
#tar -dvf home.tar home/*
#tar -dvf /root/home.tar home/*>> These are Correct
2)Here we Don't Give Like That | Wrong Syntax
#tar -dvf /root/home.tar /home/*
Original Source Document it does not come with '/' like /root/home* (or) /home*
Example if the original source file is /root/rhel5 mean
our pwd should be /root/
Because while compress file it compress like
[root@master /]# tar -df home1.tar
home/
home/indraveer/
home/indraveer/.login.old
home/indraveer/.profile.old
it compress like.
3)#tar -tf backup.tar >> list the achieve files
4) How to exract the tar file to the particular Location
#tar -xvf scartch.bak -C /
#tar -xvf Sourcefile.tar -C DestinationDirectory
-C change Destination Directory
0 Comments