F
F
fStrange2013-06-04 12:30:55
Backup
fStrange, 2013-06-04 12:30:55

How to archive everything but pictures?

I'm not strong in * nix commands, tell me.
I know how to archive an arbitrary folder. And how would I archive everything (including files in subdirectories) except for files with a specific extension?
Pictures and videos should be excluded.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
@
@sledopit, 2013-06-04
@fStrange

tar -pczvf archive.tar.gz --exclude="*.avi" --exclude="*jpg" /path/to/dir

A
Anton Pronin, 2013-06-04
@nightw0rk

or so
find . -type f \( -iname "*.*" ! -iname "*.php" \) | zip arch.zip [email protected]

V
Valentine, 2013-06-04
@vvpoloskin

find. -not \( -name '*.jpg' -o -name '*.png' -o -name '*.gif'\) | xargs tar -czvf archive.tar.gz

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question