i need to compress each holder to an archive. it has nearly a hundred folders. how can i do this in a quickest way? i don't want to right click each --> "create archive.." that tooooo slow! thanks!
i need to compress each holder to an archive. it has nearly a hundred folders. how can i do this in a quickest way? i don't want to right click each --> "create archive.." that tooooo slow! thanks!
Ubuntu 7.10 on P4 1.8G and PIII 933mHz
write a shell script that loops through each directory name and compresses it.
sorry i don't know how to write a script! noob.....
Ubuntu 7.10 on P4 1.8G and PIII 933mHz
Try:
That will make a tar file for every directory in the directory it's run.Code:find . -maxdepth 1 -type d ! -name "." -exec echo "'{}'" \; -exec tar cf '{}.tar' '{}' \;
Don't try to make something "fast" until you are able to quantify "slow".
if i want it to be .zip or .rar then should it be
find . -maxdepth 1 -type d ! -name "." -exec echo "'{}'" \; -exec zip cf '{}.zip' '{}' \;
Ubuntu 7.10 on P4 1.8G and PIII 933mHz
I'm not familiar with the syntax of zip but, it looks like you understand the find command I posted so, you may want to check the man page for zip and figure out the exact syntax zip uses to create an archive:
Code:man zip
Don't try to make something "fast" until you are able to quantify "slow".
thanks. problem solved
Ubuntu 7.10 on P4 1.8G and PIII 933mHz
Bookmarks