[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tar command and -X -T options.



Hi,
I'm on Debian Squeeze 6.0.7 amd64, I always used tar command for my
backups using a couple of file to include and exclude directories.
Now something strange it happens:
(username) means the name which it's used to login to the system.

root@mitas:~# tar --version
tar (GNU tar) 1.23
root@mitas:~# tar zcpf /tmp/bck.tgz -X out -T in
root@mitas:~# cat out
/home/(username)/linux-source-2.6.32

root@mitas:~# cat in
/home/(username)/linux-source-2.6.32/.config

root@mitas:~# ls -l /tmp/bck.tgz
-rw-r--r-- 1 root root 45 27 mar 15.33 /tmp/bck.tgz

Tar command creates an empty bck.tgz file (45 bytes length) could
anybody tell me why isn't .config file archive by tar?

Aren't you excluding it by what you have in file "out"?  (The pattern
to exclude is a superset of the pattern to include.)

It seems to work changing "out" file in this way:

root@mitas:~# cat out
/home/(username)/linux-source-2.6.32/\*

root@mitas:~# tar ztvf /tmp/bck.tgz
-rw-r--r-- (username)/(groupname)   55699 2013-03-29 15:51 home/(username)/linux-source-2.6.32/.config

but I've an /home/(username)/ entry in my "in" file that it will include
linux-source-2.6.32 subdirectory globally in bck.tgz  :-(

bye,

--
                                        Franco Martelli.


Reply to: