In the last class, - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

In the last class,

Description:

In the last class, The concept of file system. The use of inode to store attributes ... The use of inode to store attributes. Use ln to create a hard link ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 12
Provided by: VTU1
Category:
Tags: class | inode | last

less

Transcript and Presenter's Notes

Title: In the last class,


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
  • Files time stamp
  • Change files 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 1430 emp.lst
  • ls -lu emp.lst
  • -rw-r--r-- 1 kumar metal 870 mar 16 1430 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 1030 emp.lst
  • touch -a 01261650 emp.lst ls -lu emp.lst
  • -rw-r--r-- 1 kumar metal 870 jan 26 1650 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
  • Files time stamp
  • Change files modification and access times
    touch command

11
  • THANK YOU
Write a Comment
User Comments (0)
About PowerShow.com