I have a problem. I need to compress a root folder, but it has a lot of ZIP/BZIP/TAR files in its subfolders. Can someone show me a script that will search and unzip each subfolder's zip file and then 7-zip the root folder with maximum compression?
|
It should be noted that You will need to install
Simply enter the following script in your text editor, save it and make it executable. Then simply execute it in the desired folder (but see important notes below to see how it works). (The find command-line in this script is used from this question here.)
Important Notes:
In the script, I have not deleted the files that are fetched from the subdirectories; you can add that if you wish, and tailor the script to your needs, but I hope this is useful for learning about basic scripting. |
||||
|
|
|
Try to write your own, it's fun! :-) Here are a few ideas and starting points:
Edit: Actually it might be a lot easier if you start by contructing the commands step by step and examining the errors/output of each. |
|||
|
|
|
You could write a script or do it the easy way by using Nautilus search.
When done compress the root folder. PS: I love the terminal, but sometimes GUI is just faster. |
||||
|
|
