1 / 11

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. In this class,. The concept of user mask – umask

Download Presentation

In the last class,

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

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

  9. 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

  10. summary 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 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

  11. THANK YOU

More Related