Command Line Tips & Tricks
<br>
Zipping...
Zip a directory: <br>
- when making a backup of the site on the server for example -
tar -zcvf name_of_your_zip.tar.gz directory_to_zip/
Decompress and unpack the archive into the current directory:
tar -zxvf name_of_your_zip.tar.gz
Zip multiple folders into separate zip's:
for i in */; do zip -r "${i%/}.zip" "$i"; done;
Remove all zip's:
rm -f *.zip
Remove all EXCEPT zip's:
rm -r !(*.zip)
Unzip all:
unzip \*.zip
<br>
General...
List contents of the current directory in a nice way, by using a shortcut:
ll
In your .bash_profile add an alias:
alias ll="ls -lahG"
Written by Audrius Kiu
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Command line
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#