DavidLearns
asked on
uncompress/compress a whole folder in UNIX
Hi, Can anybody show me how to uncompress/compress a whole folder? The folder structures should remain the same and only the files are uncompressed/compressed. Thanks.
David
David
ASKER
Griessh, actually I am trying to uncompress a folder which I believe was compresssed. And only the files were compressed and folders were not. David
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> folders were not
a folder can't be compressed, because it is only a structural element. The content of a file however can be compressed.
a folder can't be compressed, because it is only a structural element. The content of a file however can be compressed.
So, are you saying you have a folder with compressed files ????
Hi,
to make it generic, you could just say -
$ find /sourcedir/ -name "*" -exec compress {} \;
This would compress any files that it finds in /sourcedir.
Regards,
Kusuma
to make it generic, you could just say -
$ find /sourcedir/ -name "*" -exec compress {} \;
This would compress any files that it finds in /sourcedir.
Regards,
Kusuma
kusuma.
What's the point in trying to compress folders, links, devices, FIFO's etc?
Why use compress instead of gzip or bzip2?
What's the point in trying to compress folders, links, devices, FIFO's etc?
Why use compress instead of gzip or bzip2?
Why don't you use gzip -r?
Another option would be to 'tar' first and the zip the file
======
Werner