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

Re: tar command and -X -T options.



Franco Martelli, 28.03.2013:
> 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.)


Reply to: