Results 1 to 3 of 3
Gday,
quick question, how would i go about taring multiple file types, such as *.doc *.pdf *.txt
i know that i can use the command
Code:
tar -zcvf filename.tar.gz /location/of/backup ...
- 05-21-2009 #1Linux Newbie
- Join Date
- Jul 2005
- Location
- Australia (Down Under)
- Posts
- 141
tar multiple file types eg *.doc *.txt
Gday,
quick question, how would i go about taring multiple file types, such as *.doc *.pdf *.txt
i know that i can use the command, but how do i include multiple wild cards?Code:tar -zcvf filename.tar.gz /location/of/backup *.doc
thanksLinux is the OS of tomorrow, Here today!!
- 05-21-2009 #2Linux User
- Join Date
- Feb 2006
- Posts
- 484
tar vcfz backup.tar.gz *.{doc,txt,any} -C /location/of/backup
or
tar vcfz backup.tar.gz *.[doc,txt,any] -C /location/of/backup
- 05-21-2009 #3Linux Newbie
- Join Date
- Jul 2005
- Location
- Australia (Down Under)
- Posts
- 141
thanks for your reply, this seems to only work in the specified directory (parent directory) and none of the folders inside this one (child directories). Is there a way to include the (.doc & .txt ) files for example, in the child directories.
thanksLinux is the OS of tomorrow, Here today!!


Reply With Quote
