I am trying to make a tar archive of all files in my /var
directory. Naturally, I want to exclude the Unix sockets in there.
So I try a command that looks something like:
sudo find /var \! -type s -exec tar -rf ~/test/etc.tar {} \;
But this throws up the repeated error message
tar format cannot archive socket:
When I try to do a copy instead of tar, I get a similar error:
cp: ./var/run/devd.pipe is a socket (not copied).
Does anyone have an idea why find
fails to exclude files of type socket? It is able to exclude, for instance, files of type directory..