|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
||||
|
||||
|
tar creation - Wildcards
Hello there, I was wondering if anyone could help me.
I would like to know if there is an easy way of creating a tar file, but only allowing files of specific types? ie .php* or .plib If anyone knows that would be great.... |
|
#2
|
|||
|
|||
|
You can use "find" to feed filenames to tar, eg.
Code:
find . -name '*.php*' | tar czf filename.tgz -T - hth, M.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
||||
|
||||
|
Quote:
Thanks for the command, I tried it, however it included symbolic links in the tar file aswell, is there a way I can run 'find -type f' or something? so that it only includes actual files.... Any help would be great. |
|
#4
|
|||
|
|||
|
Yep I think there is such an option. You should check man find to know more about this.
|
|
#5
|
|||
|
|||
|
Quote:
What do you want instead? The files the symlinks are pointing to? Or leaving them out completely? "-type f" for find should work if you don't want to include them at all, parameter "-h" to tar would dump the files the symlinks are pointing to instead of the links. As nbarraud pointed out already: The "man pages" are a must-read for unix admins. Type "man tar" and "man find" to see all those other fancy functions ![]() M. |
|
#6
|
||||
|
||||
|
Hey thanks for that, yeah I looked again in the man pages, and ended up using the -type -f so it did not include the the links, but only the main files.
I did read the man pages , was just having a blonde moment, and still getting used to be able to 'pipe' one command into other programs etc.Cheers for the help guys, its appreciated. ![]() |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > tar creation - Wildcards |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|