Monday, January 13, 2014

Linux Commands

-->
chown:

Regular users cannot change the ownership of a file, root can only do that. Group can be changed by regular user to the group which the users belongs to.

Example : chown filename
To allow non-root users to change the owner of a file, change the suid of the chown command as given below

chmod u+s chown


Editing a file inline
--------------------------

sed -i 's/suman/siddhanth/g' testfile

perl -i.bak -pe 's/suman/siddhanth/g' testfile


No comments: