Thursday, 30 August 2012

Changing Primary Group and Adding Secondary Group to a user


#  usermod -g testgroup user1

This command is used for changing a user’s primary group.




#  usermod -G testgroup user1

   This command is used for adding a secondary group to the user1.

Thursday, 2 August 2012

Using gzip & gunzip Commands



gzip =  this command is used to compress any type of file but not Dir. After using below command

file1 becomes “ file1.gz “.
        
   gzip file1
  
        OR


   gzip –v file1

(In the above command v = verbose )

gunzip =  This command is used to unzip a “ .gz “ file type. 
    gunzip file1.gz
   
          OR
    
    gunzip –v file1.gz

          OR

    
    gzip -dv file1.gz

( Where d = decompress ).