#未完待续
The only way to unlock a single file
If I just want to untie the package file,
One of the files in it, how do you do it? Vigilance simple, you just use-JTV to find the file name you want, and then the file name
You can undo it. We use the following example 杢 to illustrate:
# 1. First find our file name, fake ou untie shadow file OK:
[[Email protected]~]# tar-jtv-f/root/etc.tar.bz2 | Grep'Shadow'-R--------Root/root1230 -- the- in Geneva: +: -etc/shadow--R--------Root/root622 -- the- in Geneva: +: -etc/gshadow--R--------Root/root636 -- the- in Geneva: +: -etc/Gshadow-R--------Root/root1257 -- the- in Geneva: +: -Etc/shadow <==This is what we want!
# 2. Untie the file! The astonished law does not practice as follows:
[Email protected] ~]# TAR-JXV-
Package a directory, but do not include some of the file practices in that directory
Fake ou we want to pack/etc//root a few important catalogs, but don't want to pack/root/etc* 's opening files because it
We've just created a backup file! and fake OU this new packing file to be placed/root/system.tar.bz2,
Of course this file does not have to pack itself (because this file is placed under/root!). ), we can now pass through the--exclude
Help! That exclude is not bag ton of meaning! So you can do this:
[Email protected] ~]# TAR-JCV -f/root/system.tar.bz2--exclude=/root/etc* \
Backup only a new file than at some point
In some cases you will want to back up your new files and don't want to back up your old files! At this time--newer-mtime this election is the powder weight
I'll take it! In fact, there are two elections, one is "--newer" and the other is "--newer-mtime", the two choices are what
Not the same? We talked about three different time parameters in the touch introduction of the seventh chapter, and when using--newer, it means that subsequent
The date package ton "Mtime not CTime", and--newer-mtime is only mtime! That's it! ^_^.
Then let us 杢 try to deal with it!
[[email protected] ~]# tar-jcv-f/root/etc.newer.then.passwd.tar.bz2 \ >--newer-mtime= 2008/09/29 /etc/*