0

I have this warning message about sockets with tar:

ERRO[0000] Can't add file /home/ubuntu/backup-db/.bunion.sock to tar: archive/tar: sockets not supported

how can I tell tar that I don't care?

1
  • 1
    What implementation of tar are you using? it appears to be possible in GNU tar using --warning=no-file-ignored – steeldriver Oct 4 '19 at 21:59
0

--exclude is the command line option.

3
  • umm like ``--exclude=pattern'`? – Alexander Mills Oct 4 '19 at 21:47
  • does the pattern of --exclude support file modes? could you use it to exclude sockets, no matter what their name is? – Uncle Billy Oct 5 '19 at 6:14
  • I don't think so. For something like that, I'd use find piped into a file and use that as the list of files to tar, e.g. tar Jcvf myfile.tar -T <(find . -type f) (untested of course) – Aaron D. Marasco Oct 5 '19 at 23:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.