Changes

Jump to navigation Jump to search
46 bytes added ,  21:48, 17 February 2013
Line 107: Line 107:  
  cp         copies or backsup a file
 
  cp         copies or backsup a file
 
  rm         removes or deletes a file
 
  rm         removes or deletes a file
  ps -ax|grep <process> outputs processes running <process>
+
  ps -aux|grep <process> outputs processes running <process>
 
  ps -AH         report process status
 
  ps -AH         report process status
 
  top         shows processes
 
  top         shows processes
Line 113: Line 113:  
  htop                    shows processes (more versatile than top)
 
  htop                    shows processes (more versatile than top)
 
  iptraf         shows network info
 
  iptraf         shows network info
  mc -d                  show midnight commander to navigate through system easily
+
  mc -d                  show midnight commander (cli file browser) to navigate through system easily
 
  cat /proc/mdstat shows software raid
 
  cat /proc/mdstat shows software raid
 
  host -t mx aol.com shows the mx records for aol.com
 
  host -t mx aol.com shows the mx records for aol.com
Line 121: Line 121:  
  grep -r "casesensitivesearch" * finds all documents containing the criteria in a dir
 
  grep -r "casesensitivesearch" * finds all documents containing the criteria in a dir
 
  tail -f /var/log/<LOGFILE> realtime viewing of your log file
 
  tail -f /var/log/<LOGFILE> realtime viewing of your log file
  hdparm -t /dev/mdx (where x is 0,1,2,etc) shows software raid performance
+
  hdparm -Tt /dev/mdx (where x is 0,1,2,etc) shows software raid performance
 
  mdadm --detail /dev/mdx (where x is 0,1,2,etc) gives raid info
 
  mdadm --detail /dev/mdx (where x is 0,1,2,etc) gives raid info
 
  tar -czvf foo.tar.gz foo                              creates a tar/zip file of a directory
 
  tar -czvf foo.tar.gz foo                              creates a tar/zip file of a directory
 
  tar -xvzf foo.tar.gz                                  untar/unzip a tar/zip file
 
  tar -xvzf foo.tar.gz                                  untar/unzip a tar/zip file
  scp -P <ssh_portnumber> foo.tar.gz <other_server_ipaddress>:/opt    transfers file to another server
+
  scp -P <ssh_portnumber> foo.tar.gz <user>@<other_server_ipaddress>:/opt    transfers file to another server in /opt directory
 
  rsync --progress -te "ssh -p <ssh_portnumber>" foo <other_server_ipaddress>:/opt    transfers file to another server
 
  rsync --progress -te "ssh -p <ssh_portnumber>" foo <other_server_ipaddress>:/opt    transfers file to another server
 
  sed -i s/foo/fee/g <FILENAMEORPATHTODIR>  replaces foo with fee
 
  sed -i s/foo/fee/g <FILENAMEORPATHTODIR>  replaces foo with fee

Navigation menu