Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• ls –l
ls –l
total 176
-rw-r--r-- 1 root root 683 Aug 19 09:59 0001.pcap
-rw------- 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Jul 31 02:48 Desktop
drwxr-xr-x 2 root root 4096 Jul 31 02:48 Documents
-rw-r--r-- 1 root root 48867 Jul 31 02:17 install.log
-rw-r--r-- 1 root root 683 Aug 19 09:59 0001.pcap
$ls -l
-rwxr-xr-- 1 amrood users 1024 Nov 2 00:10 myfile
drwxr-xr-- 1 amrood users 1024 Nov 2 00:10 mydir
r-----Read
w----Write
X-----Execute
First group-user
Second group-group
Third group-others
Changing file permission
chmod
ls –l abc
-rw-r--r-- 1 student users 1024 Nov 2 00:10 abc
ls –l abc
-rw-r--r-- 1 student users 1024 Nov 2 00:10 abc
Ls –l abc
---------- 1 student users 1024 Nov 2 00:10 abc
Using chmod recursively (-R)
Chmod –R a+x shell_script
(Shell_script is a directory)
Chmod –R 755 .
Chmod –R a+x *
Directory permission
Changing File Ownership
chown
The chown command stands for "change owner"
and is used to change the owner of a file.
The chown command changes the ownership of
a file. The basic syntax is as follows:
$ chown option user(owner) file(s)
EX:$ chown amrood testfile
Changing Group Ownership:
The chrgp command changes the group
ownership of a file. The basic syntax is as
follows:
$ chgrp group filelist
The value of group can be the name of a group
on the system or the group ID (GID) of a group
on the system.
example:
• $ chgrp special testfile
We can change user and group with the
command
vi <filename>
Three mode
Command Mode
Input mode
Ex mode
Command Mode
When user starts up vi editor, user are in
“command mode”.