I'm running tar
as root like this:
cd /
tar --create \
--verify \
--exclude-backups \
--exclude-caches \
--auto-compress \
--file /tmp/home.tar.gz \
--exclude=/home/elena/.gvfs \
home
tar
outputs:
tar: home/elena/.gvfs: Cannot stat: Permission denied
I would expect the .gvfs
[1] directory to be ignored completely. Why is GNU tar
running stat
over it?
As to why I'm using /home/elena/.gvfs
- an absolute path - to match the .gvfs
directory, it is because - to my knowledge - there is no other way to select single directories for exclusion without excluding matching subdirectories at any level as well.
I've tried putting the --exclude
line after home
, to take possible quirks in different versions of tar
into account, but that changes nothing.
Thanks for your attention.
GNU tar
version: 1.23
--
[1] ~/.gvfs
is a way to access the Gnome Virtual File System I'm skipping it because I know it can't be accessed, and it doesn't make sense to archive it. I still wonder why tar
doesn't skip it completely.
/home/elena/.gvfs
? – MattDMo Jul 12 '13 at 14:32ls -l /home/elena/.gvfs
as root fails because of denied access. However, I know that.gvfs
is a way to access the Gnome Virtual File System: http://en.wikipedia.org/wiki/GVFSI'm skipping it because I know it can't be accessed, and it doesn't make sense to archive it.
– Eleno Jul 12 '13 at 14:57ls -al /home/elena
and let us know what the entire.gvfs
line says. This way, you're not trying to read the contents of.gvfs
asls -l /home/elena/.gvfs
is doing. Also, can you read/home/elena/.gvfs
as userelena
, notroot
? – MattDMo Jul 12 '13 at 17:22ls: cannot access /home/elena/.gvfs: Permission denied
.And the
.gvfs
line reads:d?????????? ? ? ? ? ? .gvfs
It's the only item in the output of
– Eleno Jul 12 '13 at 17:51ls
that looks weird.d?????????? ? ? ? ? ?
(approximately, I just typed that in...) – MattDMo Jul 12 '13 at 18:35