file compression


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting file compression
# 1  
Old 08-31-2010
file compression

I'am looking for script (or tool) that would compress all files with given extension in all subdirectory. Important part is that every one file have to end in separate archive whit it's own name.
Eaven if I could point multiple file in one directory and compress them it would be ok.
I' am almost sure I had this kind tool in graphic enviroment but it was long ago...
# 2  
Old 08-31-2010
For example, gzip log file one by one.

Code:
find . -name "*.log" -exec gzip {} \;

This User Gave Thanks to rdcwayx For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Compression ratios of .tbz file

Hi, I have a question about finding the compression ratios of a zip (bzip2) file.I have written a procedure which upon certain criteria tar's and bzip2 certain directories and moves them to a near line storage. Yesterday I happened to stumble upon it. The procedure has tared and bzipped 6... (3 Replies)
Discussion started by: maverick_here
3 Replies

2. Red Hat

file roller compression problems with 7z

Can some please tell me why I can't make a 7z archive with file roller? I have already installed p7zip, p7zip-plugins, and 7za. I don't understand what the problem is. I can make a 7z archive from the command line with no problems. I keep getting this message but it doesn't tell me what the error... (0 Replies)
Discussion started by: cokedude
0 Replies

3. Shell Programming and Scripting

Folder compression

Hi Guys, totally new to scripting. I have a huge list of foleders. I want to tar the contents of each folder inside the same folder and the name of the tar file is the same name as the folder. how would I go about this in scirpt? cheers Viper (3 Replies)
Discussion started by: brownviper1966
3 Replies

4. Linux

Clearning space - File compression issue

Hi, We have access to 2 filesystems: Filesystem Size Used Avail Use% Mounted on /dev/mapper/system-oraoid 30G 30G 119M 100% /app /dev/mapper/system-tmp 2.0G 442M 1.6G 22% /tmp As you can observe the file system on /app is full. In order to recover... (2 Replies)
Discussion started by: animesh303
2 Replies

5. UNIX for Dummies Questions & Answers

.z file compression

Hello, I have a .z file which i understand to be UNIX. I'm on PC (no UNIX boxes) and have tried many different unzipping programs to extract this .z file, but only PicoZip has allowed me to view what is inside (telling me, i think, that it's not corrupt), but i have not been able to extract... (3 Replies)
Discussion started by: Gonecat
3 Replies

6. UNIX for Dummies Questions & Answers

.bz2 compression

I have heard that bz2 compression a relatively new compression encoding algorithm, far superior to tar and gz. I also remember that I downloaded a FreeBSD LiveCD a while back that was only a couple hundred megs instead of the usual 650ish using bz2 - big difference, I'd say. But to the point, what... (4 Replies)
Discussion started by: Phobos
4 Replies

7. UNIX for Dummies Questions & Answers

compression utilities

I've noticed bzip2 gives a little bit better compression than gzip. So...I'm curious...what's gives the best compression out of all the compression utilities? Thanks! (6 Replies)
Discussion started by: jalburger
6 Replies

8. UNIX for Dummies Questions & Answers

tar compression - please help

I'm backing up one of my sites, and will be moving to another host. This was an expermintal site, and many of the directories won't be needed. What tar command is needed to exclude directories from the compressed file? Could you also give an example. also this might be the same comand, but -... (4 Replies)
Discussion started by: Taylor
4 Replies

9. UNIX for Dummies Questions & Answers

file compression

Is it possible to unzip / compress a file that was zipped using WinZip? thanks, kristy (2 Replies)
Discussion started by: kristy
2 Replies
Login or Register to Ask a Question