______________ myFolder
What can I replace with _____ to recursively gzip every file starting at myFolder and have the gzip be overwrite the file (rename the gzip file to the original filename)?
What can I replace with _____ to recursively gzip every file starting at myFolder and have the gzip be overwrite the file (rename the gzip file to the original filename)? |
||||
|
|
|
You could also try
|
|||
|
|
try:
|
|||
|
|
A simple, not very elegant bash script is to simply cd in, gzip them all in a loop, and mv them back (gzip by default removes the non-compressed file):
Put that in a file called "gzip_and_rename.sh" for example, chmod -775 and run it like ./gzip_and_rename.sh (if running from within myFolder itself, remove the "cd myFolder" line from the script). |
|||||||
|