In the last class,

11
In the last class, The concept of file system The use of inode to store attributes Use ln to create a hard link Where to use hard links, its limitations Symbolic links The directory – read, write and execute permissions

description

In the last class,. The concept of file system The use of inode to store attributes Use ln to create a hard link Where to use hard links, its limitations Symbolic links The directory – read, write and execute permissions. In this class,. The concept of user mask – umask - PowerPoint PPT Presentation

Transcript of In the last class,

Page 1: In the last class,

In the last class,

The concept of file system

The use of inode to store attributes

Use ln to create a hard link

Where to use hard links, its limitations

Symbolic links

The directory – read, write and execute permissions

Page 2: In the last class,

In this class,

• The concept of user mask – umask

• To change default file and directory permissions, using umask

• File’s time stamp

• Change file’s modification and access times – touch command

Page 3: In the last class,

umask: DEFAULT FILE AND DIRECTORY PERMISSIONS

• Usually we have,

rw-rw-rw- (octal 666) for regular files

rwxrwxrwx (octal 777) for directories

• The default is transformed by subtracting the user mask from it to remove one or more permissions

• We can evaluate the current value of the mask as,

$ umask

022

Page 4: In the last class,

This becomes 644 (666-022) for ordinary files and 755 (777-022) for directories

umask 000

Indicates, we are not subtracting anything and the default permissions will remain unchanged

Note that, changing system wide default permission seetings is possible using chmod but not by umask

Page 5: In the last class,

MODIFICATION AND ACCESS TIMES• Time of last file modification ls -l• Time of last access ls -lu

The access time is displayed when ls -l is combined with the -u option

Page 6: In the last class,

TOUCH COMMAND

To set the modification and access times to predefined values

touch options expression filename(s)

touch emp.lst (without options and expression)

Then, both times are set to the current time and creates the file

Page 7: In the last class,

touch command (without options but with expression)

The expression consists of MMDDhhmm

touch 03161430 emp.lst ; ls -l emp.lst

-rw-r--r-- 1 kumar metal 870 mar 16 14:30 emp.lst

ls -lu emp.lst

-rw-r--r-- 1 kumar metal 870 mar 16 14:30 emp.lst

Page 8: In the last class,

It is possible to change the two times individually,touch command (with options and expression)-m for changing modification time-a for changing access timetouch -m 02281030 emp.lst ; ls -l emp.lst-rw-r--r-- 1 kumar metal 870 feb 28 10:30 emp.lsttouch -a 01261650 emp.lst ; ls -lu emp.lst-rw-r--r-- 1 kumar metal 870 jan 26 16:50 emp.lst

Page 9: In the last class,

find : locating files

It recursively examines a directory tree to look for files matching some criteria, and then takes some action on the selected files

find path_list selecton_criteria action

where,• Recursively examines all files specified in path_list• It then matches each file for one or more selection-

criteria• It takes some action on those selected files

Page 10: In the last class,

summaryThe concept of file systemThe use of inode to store attributesUse ln to create a hard linkWhere to use hard links, its limitationsSymbolic linksThe directory – read, write and execute permissionsThe concept of user mask – umaskTo change default file and directory permissions, using

umaskFile’s time stampChange file’s modification and access times – touch

command

Page 11: In the last class,

• THANK YOU