This article is just a collection of commands and shortcuts I need quite often.
Creating a single archive file from a complete folder
$ tar -zcvf ~/[target file].tar.gz [folder you want to copy]
Getting a file from a remote host to localhost
$ scp [username]@[host]:[path/to/remote/file] [path/to/local/folder]
Shell Shortcuts
Copy a selected text:
Ctrl + Shift + C
Paste a text from clipboard to the command line:
Ctrl + Shift + V
Copy a selected text from the command line and paste it:
Mouse wheel click
Search through the history of commands you have typed before:
Ctrl + R
Web stuff
Watching the Apache error log
$ tail -f /var/log/apache2/error.log
Truncating the Apache error log
$ sudo truncate -s 0 /var/log/apache2/error.log
Finding php.ini
$ php -i | grep "Loaded Configuration File"
Importing data to MySQL
$ mysql --host localhost -u root -p write-math < wm_raw_draw_data.sql