CHOWN and CHMOD Examples

1. Change the owner of a file

# ls -lart tmpfile [ls is used to diplay the file/directory properties]
-rw-r--r-- 1 himanshu family 0 2012-05-22 20:03 tmpfile
# chown root tmpfile
# ls -l tmpfile
-rw-r--r-- 1 root family 0 2012-05-22 20:03 tmpfile