Some Useful Linux Commands
1) Monitoring
  • To see running processes:  ps -f
  • To see processes by application name:  ps ax | grep <appname>
  • Kill process:  kill -9 <pid>
  • Signal to process (for example to restart nginx): kill -s HUP <pid of master nginx>
  • Used for monitoring system input/output: iostat
  • System-monitor process-viewe: htop or top
  • Sisplays network connections: netstat
2) Files
  • Ensure that all directories are 775 
        find /var/www/test -type d | xargs chmod 775 
or
       chmod 0755 $(find . -type d)
  • Make all files group and owner readwrite 
      find /var/www/test -type f | xargs chmod o+w,o+r,g+w,g+r
  • make sh script executable:
      add to beginning of the file #!/bin/bash
      chmod +x <name.sh>
  • To see changes in file in real time: tail -f <file name>
  • Create symbolic link ln -s <real file location>
  • Find file: find ./ -name <searchterm>
  • Text viewer/editor : nano <filename>
  • Text viewer/editor : vim <filename>need to press
a - to enter in the editor mode, then press esc - to exit from editor mode, and :qw command to quit and write changes File manage: mc 3) Version Control System
  • SVN 
       Copy remote repository  svn checkout https://test.com:8443/svn/Project/trunk ./ --username <name> --password <pass>       Commit svn commit -m "added howto section."
  • GIT
      Copy remote repository git clone https://test.com:8443/svn/Project/trunk       Commit:
      git commit -a -m "bug fixed"      git pushor
    git add <changed file>    git commit -m "bug fixed" 
    git push

Good posts:
Some Useful Linux Commands
The 10 most useful Linux commands