![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script to count files and get the disk usgae on individual mail folders | phpfreak | Shell Programming and Scripting | 1 | 05-17-2008 01:15 PM |
| compare files and create new with awk | tonet | Shell Programming and Scripting | 7 | 12-27-2007 06:05 AM |
| Create files with one command | jess_t03 | Shell Programming and Scripting | 6 | 10-09-2007 11:30 AM |
| on how to create files | fiol73 | UNIX for Dummies Questions & Answers | 2 | 12-19-2006 03:41 AM |
| How to compare several files and create a new one | alxkn | UNIX for Dummies Questions & Answers | 1 | 07-17-2006 08:04 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Create individual tgz files from a set of files
Hello
I have a ton of files in a directory of the format app.log.2008-04-04 I'd like to run a command that would archive each of these files as app.log.2008-04-04.tgz I tried a few combinations of find with xargs etc but no luck. Thanks Amit |
| Forum Sponsor | ||
|
|
|
|||
|
The point is that it seems useless to archive a file in an archive individually, if its just to save space then just gzip the lot ... you wont have a file and its archived gzipped alter ego then, but just compressed files...
|
|
|||
|
Thanks for the response. You're right, I just needed to gzip the files. I do want them individually though (for various reasons). The command that I eventually stumbled on and which works fine is :
for i in `ls -l`; do echo $i; bzip2 $i ; done |