Thursday, October 24, 2013

Process Management Linux Commands

Process Management Linux Commands

• ps – report a snapshot of the current processes                                      

Usage: ps [OPTION]                                                                          

eg. ps,  ps ­-el   

• bg – make a foreground process to run in background                        

Usage: type 'ctrl+z'  and then 'bg <job id>' 

 • fg – to make background process as foreground process                      

Usage: fg [jobid]

 • jobs – displays the names and ids of background jobs                         

Usage: jobs

• kill – to kill a process(using signal mechanism)                                     

Usage: kill [OPTION] pid                                                                  

eg. kill -­9 2275 

Archival

• tar – to archive a file                                                                              

Usage: tar [OPTION] DEST SOURCE                                           

eg. tar -­cvf /home/archive.tar /home/original                                         

     tar ­-xvf /home/archive.tar 

• zip – package and compress (archive) files                                           

Usage: zip [OPTION] DEST SOURSE                                           

eg. zip original.zip original

• unzip – list, test and extract compressed files in a ZIP archive           

Usage: unzip filename         

eg. unzip original.zip

Network

• ssh – SSH client (remote login program)                                         

“ssh is a program for logging into a remote machine and for executing commands on a remote machine”        

Usage: ssh [options] [user]@hostname    

eg. ssh -­X guest@10.105.11.20 

• scp – secure copy (remote file copy program)                                       

“scp copies files between hosts on a network”          

Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2]  

eg. scp file1.txt guest@10.105.11.20:~/Desktop/

File Systems

• fdisk – partition manipulator                                                        

eg. sudo fdisk ­-l 

• mount – mount a file system                                                       

Usage: mount -­t type device dir                                               

eg. mount /dev/sda5 /media/target                                       

• umount – unmount file systems                                                  

Usage: umount [OPTIONS] dir | device...                               

eg.  umount /media/target 

• du – estimate file space usage                                                                 

Usage:  du [OPTION]... [FILE]...                                                      

eg. du      

• df – report filesystem disk space usage                                                 

Usage: df [OPTION]... [FILE]...                                                        

eg. df     

• quota – display disk usage and limits                                                   

Usage: quota [OPTION]                                                                    

eg. quota ­-v    

Advanced Commands

• reboot – reboot the system                                                             

Usage: reboot [OPTION]                                                       

eg. reboot                                                                                            

• poweroff – power off the system                                                   

Usage: poweroff [OPTION]      

eg. poweroff

• sed–  stream editor for filtering and transforming text               

Usage: sed [OPTION] [input­file]...                                        

eg. sed 's/love/hate/g' loveletter.txt 

• awk– pattern scanning and processing language                        

eg.  awk ­-F: '{ print $1 }' sample_awk.txt 

• find – search for files in a directory hierarchy                                       

Usage: find [OPTION] [path] [pattern]                                             

eg. find ­name file1.txt 

• locate – find or locate a file      

Usage: locate [OPTION]... FILE...      

eg. locate file1.txt

Editor commands

• kate – KDE Advanced Text Editor                                                         

Usage:  kate [options][file(s)]                                                            

eg. kate file1.txt file2.txt                                                                

• vim – Vi Improved, a programmers text editor                                       

Usage: vim [OPTION] [file]...                                                           

eg. vi hello.c 

• gedit ­ A text Editor. Used to create and edit files.                                          

Usage: gedit [OPTION] [FILE]...                                                      

eg. gedit        




No comments:

Post a Comment