Linux Information

From Kb

Jump to: navigation, search

Contact Article Author | Blog of Article Author | FirstPartners.net Home | LinkedIn profile of Author

Contents

Useful Directories

/etc/ - MySql and other database information

/etc/init.d - startup scripts

/var/log - other logs

/var/log/httpd - web server logs

/var/www/html - web server root

/usr/bin - scripts

Backup Commands

Web Dir

 tar -cvf web.tar /var/www/html
 gzip web.tar

MySql Dir

 tar -cvf mysql.tar /var/lib/mysql
 gzip mysql.tar

Linux Services

Start Service and configure to restart after server startup

service monit start
chkconfig --level 35 monit on

Other Useful Commands

Search for items in a file

grep -i -B5 -A5 'item-to-find' file-to-search

Create a link to a directory

ln -s /path/from/origfile /path/to/newlink

SCP Syntax

scp localfile username@host:.
Personal tools