http://unix.stackexchange.com/questions/68489/command-to-zip-multiple-directories-into-individual-zip-files
for i in */; do zip -r "${i%/}.zip" "$i"; done
i is the name of the loop variable. */ means every subdirectory of the current directory, and will include a trailing slash in those names. Make sure you cd to the right place before executing this. "$i" simply names that directory, including trailing slash. The quotation marks ensure that whitespace in the directory name won't cause trouble. ${i%/} is like $i but with the trailing slash removed, so you can use that to construct the name of the zip file.
If you want to see how this works, include an echo before the zip and you will see the commands printed instead of executed.
피드 구독하기:
댓글 (Atom)
sublime close without confirmation
Close without confirm Yes, you can just write a plugin to set the view as scratch and close it. Then create a keybinding for that c...
-
http://askubuntu.com/questions/21934/how-to-change-the-binding-of-windows-key-which-runs-unitys-dash just installed Ubuntu 11.04 and I w...
-
https://forums.virtualbox.org/viewtopic.php?t=11234 How to freeze date/time in VirtualBox? this can be achived by editi...
-
1 . download update 2. put a update file to localdata store directory 3 use command below esxcli software vib update -d "PATH TO A PATC...
댓글 없음:
댓글 쓰기