Permission and Ownership using awk
Awk programming
The easiest way to learn the awk command usage is to see them in action.
In order to find the working directory we are in .
Type pwd ( "print working directory" )
Then type ls ( listing)for listing to see what's in the current directory
$ ls
Permissions and Ownership
List directories and filesls -al# shows something like this for each file/dir: drwxrwxrwx# d: directory# rwx: read write execute# first triplet: user permissions (u)# second triplet: group permissions (g)# third triplet: world permissions (o)
It shows like this  when we type  
$ls -al 
drwxr-xr-x  2 prakash prakash    4096 Oct 27 03:56 Videos drwxr-xr-x  2 prakash prakash    4096 Nov 18 10:19 .vim-rw-------  1 prakash prakash   11158 Dec 16 18:54 .viminfo-rw-------  1 prakash prakash     124 Dec 16 18:11 .Xauthority-rw-------  1 prakash prakash      82 Dec 16 18:11 .xsession-errors
Assign
write and execute permissions to user and groupchmod ug+rx my_file
To
remove all permissions from all three user groupschmod ugo-rwx my_file# '+' causes the permissions selected to be added# '-' causes them to be removed# '=' causes them to be the only permissions that the file has.chmod +rx public_html/ or $ chmod 755 public_html/#Example for number system:

Comments
Post a Comment