andieje
asked on
How would i gzip every direcory within a directory and then list its size
Hi
Lets say i have my top level directory and these have subdirectories called dir1, dir2, dir3 etc. These subdirectories can in turn have subdirectories.
I would like a command which will gzip every directory in my current working directory. I am hoping this will zip any subdirectories therein. The name of the zipped top level directory can simply be the name of the original directory appended with .gz
I've seen this but this will zip and the directories and create a tar acrhive?
tar czvf mytar.tar.gz dir1 dir2 .. dirN
What if i just want to gzip the files and not create the tar file?
Lets say i have my top level directory and these have subdirectories called dir1, dir2, dir3 etc. These subdirectories can in turn have subdirectories.
I would like a command which will gzip every directory in my current working directory. I am hoping this will zip any subdirectories therein. The name of the zipped top level directory can simply be the name of the original directory appended with .gz
I've seen this but this will zip and the directories and create a tar acrhive?
tar czvf mytar.tar.gz dir1 dir2 .. dirN
What if i just want to gzip the files and not create the tar file?
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.
@Surrano,
Thanks for catching that. I typed those after a 12 hour work day doing an "after hours" server upgrade/transition.
Thanks for catching that. I typed those after a 12 hour work day doing an "after hours" server upgrade/transition.
ASKER
wonderfuol
If you want to create a compressed archive of directories and multiple files, then you need to either tar/compress, or use zip.