tar gz entire directory (compress and extract)

Very often, for backup (and other) purposes it is better to first compress the directory and then download it, or do whatever you want to do with it. These two commands provide fast and easy way to do that.

Share

Recent Posts

CSS: Height equal to dynamic width

There is a way using CSS! If you set your width depending on the parent…

3 years ago

bash: Find text in files in subdirectories recursively

grep -rnw '/path/to/somewhere/' -e 'pattern' -r or -R is recursive, -n is line number, and -w stands for match the…

7 years ago

Remove duplicate lines from text file

This snippet will remove duplicate lines from text file: awk '!seen[$0]++' filename It will display…

8 years ago

phpMyAdmin: Different SQL file name on each export

Easiest way to export your database is through phpMyAdmin. With few clicks you can get…

10 years ago

Restart Apache automatically

Put this code into a .sh file, add executable permissions to it and add it…

10 years ago

Restart MySQL automaticaly

Put this code into a .sh file, add executable permissions to it and add it…

10 years ago