• Martin Thoma
  • Home
  • Categories
  • Tags
  • Archives
  • Support me

Linux Commands for Working from home

Contents

  • Creating a single archive file from a complete folder
  • Getting a file from a remote host to localhost
  • Shell Shortcuts
  • Web stuff
    • Watching the Apache error log
    • Truncating the Apache error log
    • Finding php.ini
    • Importing data to MySQL

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

Published

Jun 30, 2014
by Martin Thoma

Category

Code

Tags

  • Shell 5
  • Software Development 16
  • SSH 4

Contact

  • Martin Thoma - A blog about Code, the Web and Cyberculture
  • E-mail subscription
  • RSS-Feed
  • Privacy/Datenschutzerklärung
  • Impressum
  • Powered by Pelican. Theme: Elegant by Talha Mansoor