SlideShare a Scribd company logo
File Management
Organization of data
       - Creating a file
       - Storing a file in required directory
       - Removing a file
       - Opening a file
       - Closing a file
       - Maintaining of file details
       - Name, Type, location, size ,
date and time of creation or modification
       - File Protection



                    http://raj-os.blogspot.in/   1
File Attributes

-   Name

-   Type

-   Location

-   Size

-   Protection

-   Time, Date and User Identification




                 http://raj-os.blogspot.in/   2
File Attributes

Name

  -    Given by the user

  -    Only information that is kept in human readable form

Type

         -   Information required by systems that support different
         types




                             http://raj-os.blogspot.in/               3
File attributes

Location

        - A pointer to a device and to the
        location of the file on that device

Size

       - Current size of file (in bytes or words )

        - Max size allowed

                         http://raj-os.blogspot.in/   4
File Attributes

Protection

      -   Access control information

          ( read, write and execute privileges )




                          http://raj-os.blogspot.in/   5
File Attributes

Time, date and user identification

      -       Creation

      -       Last modification

      -       Last use

  (Useful for protection, security and usage monitoring )




                         http://raj-os.blogspot.in/         6
Basic File Operations ( Minimal Set )

1. Creating a file

2. Repositioning within a file

3. Deleting a file

4. Truncating a file

5. Reading a file

6. Writing a file

                     http://raj-os.blogspot.in/   7
Basic File Operations


1. Creating a file


  •    Allocation of space for the file in the file system


  •    Making an entry for the new file in the directory




                          http://raj-os.blogspot.in/         8
Basic File Operations

2. Writing a file
•    Use a system call specifying
              - Name of the file

              - Information to be written

•    Search directory for the associated entry

•    Keep a write pointer

•    Update write pointer after every write

                        http://raj-os.blogspot.in/   9
Basic File Operations
3. Reading a file
•   Use a system call specifying
              - Name of the file
              - Address where to put the contents read
•   Search directory for the associated entry
•   Keep a read pointer

•   Update read pointer after every read



                          http://raj-os.blogspot.in/     10
Basic File Operations


4. Repositioning within a file

•   Also known as file seek operation

•   Search directory for the appropriate entry

•   Set current-file-position to a given value




                          http://raj-os.blogspot.in/   11
Basic File Operations


5.Deleting a file

•   Search the directory for the named file

•   Release all file space


•   Erase the directory entry




                             http://raj-os.blogspot.in/   12
Basic File Operations

6. Truncating a file

• File contents erased

• Name and attributes of file unchanged




                         http://raj-os.blogspot.in/   13
Other File Operations
• Appending
• Renaming
Appending
Add some information at the end of the file
Renaming
       Name of file changed

            All other attributes unchanged

               http://raj-os.blogspot.in/     14
Basic file operations can be combined to implement other
operations

Ex : Creating a copy of a file

- Create a new file

- Read from old file

- Write to new file




                           http://raj-os.blogspot.in/      15
Other Desirable Operations

Allow the user to get and set the various attributes of a file

Ex : i) get the file length

    ii) set file attributes like file’s owner




                         http://raj-os.blogspot.in/         16
Other Desirable Operations


Most file operations involve searching the directory for the

entry associated with the named file




                       http://raj-os.blogspot.in/         17
To Avoid Constant Searching

•   Many systems open a file when file first is used

•   The operating system keeps a small table called the

    Open file table

•   Open file table contains information about open files

•   When a file operation is requested, an index into the

    open file table is used


                              http://raj-os.blogspot.in/    18
Other File Operations

     When a file is no longer actively used, it is closed by
     the process and the O.S. removes its entry in the         Open
file table




                         http://raj-os.blogspot.in/               19
Other File Operations

• Some systems implicitly open a file when it is first referenced

• Close it automatically when the program that opened the file
  terminates




                          http://raj-os.blogspot.in/                20
Other File Operations


Most systems require that a file be opened explicitly by the

programmer with a system call ( open ) before that file can be

used




                       http://raj-os.blogspot.in/              21
File Type             Usual extension                           Function

Executable      Exe, com, bin or none                   Ready to run machine
                                                        language program
Object          obj, o                                  Compiled, machine language,
                                                        not linked

Source code     c, p, pas, f77, asm, a                  Source code in various
                                                        languages
Batch           bat, sh                                 Commands to the command
                                                        interpreter

Text            txt, doc                                textual data,documents
Word            Wp, tex, rrf etc                        Various word processor
Processor                                               formats
Library         Lib, a                                  Libraries of routines
Print or view   ps, dvi, gif                            ASCII or binary file in a
                                                        format for printing or viewing

Archive         arc, zip, tar                           Related group of files for
                                                        archiving or storage

                           Fig : Common File Types

                           http://raj-os.blogspot.in/                                    22
File Type

One major consideration in designing a file system, and the
entire operating system, is whether the operating system

should recognize and support file types




                       http://raj-os.blogspot.in/             23
File Type


•       If the operating system recognizes the type of a file
    •     it can then operate on the file in reasonable ways

    •     Ex : An attempt to print a binary-object form of a

          program file can be prevented




                            http://raj-os.blogspot.in/         24
File Type

To implement file types, include the type as part of
the file name
For Ex : letters , documents




                   http://raj-os.blogspot.in/      25
File Type


The file name is split into two parts

      -      a name

      -      an extension




                       http://raj-os.blogspot.in/   26
File Type

•   The file name is usually separated from the
    extension by a period ( dot ) character

    Ex : paycalc. cpp

•   The name can consists up to 8 characters followed
    by a period



                        http://raj-os.blogspot.in/      27
File Type
The extension tells what the file type is
• Extension can be up to 3 characters
• System uses the extension to indicate the type of the
  file
• Type of operations that can be done on that file
 For ex : .com , .exe & .bat extension are executable
  file

                       http://raj-os.blogspot.in/       28
Summary
In this class, you have learnt
- file concept
- Understand file operations
- Know various file types




                       http://raj-os.blogspot.in/   29

More Related Content

PPTX
File directory definition 54(2)
myrajendra
 
PPT
OSCh11
Joe Christensen
 
PDF
10 File System
Dr. Loganathan R
 
PDF
File management
Mohd Arif
 
PDF
File system discovery
DevMix
 
PPTX
Commands and shell programming (3)
christ university
 
PPT
Unix files
Sunil Rm
 
PPTX
2nd unit part 1
Pavan Illa
 
File directory definition 54(2)
myrajendra
 
10 File System
Dr. Loganathan R
 
File management
Mohd Arif
 
File system discovery
DevMix
 
Commands and shell programming (3)
christ university
 
Unix files
Sunil Rm
 
2nd unit part 1
Pavan Illa
 

What's hot (20)

PDF
The unix file system
gsandeepmenon
 
PDF
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...
Syaiful Ahdan
 
DOCX
The linux file system structure
Teja Bheemanapally
 
PPTX
Chapter 04
cois201.ut
 
PDF
Unix files
Sunil Rm
 
PPTX
File system structure in linux
Sukkur IBA
 
PDF
AdvFS/Advanced File System Ccncepts
Justin Goldberg
 
PPSX
Management file and directory in linux
Zkre Saleh
 
PPT
File protection.59 to 60
myrajendra
 
PPT
File Management
Ramasubbu .P
 
PPT
Files
kirtidhamija16
 
PPT
Ch11 file system interface
Abdullah Al Shiam
 
ODP
Nguyễn Vũ Hưng: Basic Linux Power Tools
Vu Hung Nguyen
 
PPTX
Chapter 3
Cahaya Penyayang
 
PPTX
File Management
ramya marichamy
 
PPT
File system
Harleen Johal
 
PPTX
File Management
insanmisteri111
 
PPT
Xfs file system for linux
Ajay Sood
 
PPT
Unix File System
student(MCA)
 
PPTX
Linux files
Geeta Vinnakota
 
The unix file system
gsandeepmenon
 
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...
Syaiful Ahdan
 
The linux file system structure
Teja Bheemanapally
 
Chapter 04
cois201.ut
 
Unix files
Sunil Rm
 
File system structure in linux
Sukkur IBA
 
AdvFS/Advanced File System Ccncepts
Justin Goldberg
 
Management file and directory in linux
Zkre Saleh
 
File protection.59 to 60
myrajendra
 
File Management
Ramasubbu .P
 
Ch11 file system interface
Abdullah Al Shiam
 
Nguyễn Vũ Hưng: Basic Linux Power Tools
Vu Hung Nguyen
 
Chapter 3
Cahaya Penyayang
 
File Management
ramya marichamy
 
File system
Harleen Johal
 
File Management
insanmisteri111
 
Xfs file system for linux
Ajay Sood
 
Unix File System
student(MCA)
 
Linux files
Geeta Vinnakota
 
Ad

Viewers also liked (20)

PPT
38 paged segmentation
myrajendra
 
PPT
35. multiplepartitionallocation
myrajendra
 
PPT
36 fragmentaio nnd pageconcepts
myrajendra
 
PPT
40 demand paging
myrajendra
 
PPT
Thrashing allocation frames.43
myrajendra
 
PPT
39 virtual memory
myrajendra
 
PPT
37 segmentation
myrajendra
 
PPT
Types of memory
myrajendra
 
PPT
Types of memory 10 to11
myrajendra
 
PPTX
Hibernate example1
myrajendra
 
PPT
Data type
myrajendra
 
PPT
Fundamentals
myrajendra
 
PPT
Deleting structure.56
myrajendra
 
PPT
Set model and page fault.44
myrajendra
 
PPT
Files concepts.53
myrajendra
 
PPT
4 various operating systems
myrajendra
 
PPTX
Operations on a directory 54(3
myrajendra
 
PPT
Disk scheduling.49
myrajendra
 
PPT
33
myrajendra
 
PPT
Issues in acyclic graph directories.57 to 58
myrajendra
 
38 paged segmentation
myrajendra
 
35. multiplepartitionallocation
myrajendra
 
36 fragmentaio nnd pageconcepts
myrajendra
 
40 demand paging
myrajendra
 
Thrashing allocation frames.43
myrajendra
 
39 virtual memory
myrajendra
 
37 segmentation
myrajendra
 
Types of memory
myrajendra
 
Types of memory 10 to11
myrajendra
 
Hibernate example1
myrajendra
 
Data type
myrajendra
 
Fundamentals
myrajendra
 
Deleting structure.56
myrajendra
 
Set model and page fault.44
myrajendra
 
Files concepts.53
myrajendra
 
4 various operating systems
myrajendra
 
Operations on a directory 54(3
myrajendra
 
Disk scheduling.49
myrajendra
 
Issues in acyclic graph directories.57 to 58
myrajendra
 
Ad

Similar to File management53(1) (20)

PPTX
Unit 6 OSY.pptx aaaaaaaaaaaaaaaaaaaaaaaa
harshlad847
 
PPTX
Learn about the File Concept in operating systems ppt
geethasenthil2706
 
PPTX
file_concept.pptx file presentation directories
namrataparopate
 
PPTX
File management
sangrampatil81
 
PPTX
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
KABILESH RAMAR
 
PPTX
The Operating System concepts.. -os.pptx
Stella526835
 
PDF
Chapter 5
Ankit Dubey
 
PPTX
FILE MANAGEMENT.pptx
jayashri kolekar
 
PDF
File Systems
Shipra Swati
 
PPTX
operating system notes for file managment.pptx
panditestmail
 
PPTX
File Management – File Concept, access methods, File types and File Operation
Dhrumil Panchal
 
PDF
File system in operating system e learning
Lavanya Sharma
 
PPT
Ch10
tech2click
 
PPTX
8 File Management system project .pptx
anitabricks49
 
PPTX
CHAPTER 1 - Operating systems File System Interface.pptx
AnithaSakthivel3
 
PPTX
(file systems)12312321321321312312312.pptx
ronniemayang
 
PPT
Unit 3 chapter 1-file management
Kalai Selvi
 
PDF
filesystem-120405093921-phpapp02 (1).pdf
TESTFALTU
 
PPT
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Unit 6 OSY.pptx aaaaaaaaaaaaaaaaaaaaaaaa
harshlad847
 
Learn about the File Concept in operating systems ppt
geethasenthil2706
 
file_concept.pptx file presentation directories
namrataparopate
 
File management
sangrampatil81
 
FILE SYSTEMS IN WINDOWS OPERATING SYSTEMS
KABILESH RAMAR
 
The Operating System concepts.. -os.pptx
Stella526835
 
Chapter 5
Ankit Dubey
 
FILE MANAGEMENT.pptx
jayashri kolekar
 
File Systems
Shipra Swati
 
operating system notes for file managment.pptx
panditestmail
 
File Management – File Concept, access methods, File types and File Operation
Dhrumil Panchal
 
File system in operating system e learning
Lavanya Sharma
 
8 File Management system project .pptx
anitabricks49
 
CHAPTER 1 - Operating systems File System Interface.pptx
AnithaSakthivel3
 
(file systems)12312321321321312312312.pptx
ronniemayang
 
Unit 3 chapter 1-file management
Kalai Selvi
 
filesystem-120405093921-phpapp02 (1).pdf
TESTFALTU
 
Chapter 10 - File System Interface
Wayne Jones Jnr
 

More from myrajendra (20)

PPTX
Jdbc workflow
myrajendra
 
PPTX
2 jdbc drivers
myrajendra
 
PPTX
3 jdbc api
myrajendra
 
PPTX
4 jdbc step1
myrajendra
 
PPTX
Dao example
myrajendra
 
PPTX
Sessionex1
myrajendra
 
PPTX
Internal
myrajendra
 
PPTX
3. elements
myrajendra
 
PPTX
2. attributes
myrajendra
 
PPTX
1 introduction to html
myrajendra
 
PPTX
Headings
myrajendra
 
PPTX
Forms
myrajendra
 
PPT
Css
myrajendra
 
PPTX
Views
myrajendra
 
PPTX
Views
myrajendra
 
PPTX
Views
myrajendra
 
PPT
Starting jdbc
myrajendra
 
PPTX
Properties
myrajendra
 
PPTX
Java.sql package
myrajendra
 
PPTX
Interface callable statement
myrajendra
 
Jdbc workflow
myrajendra
 
2 jdbc drivers
myrajendra
 
3 jdbc api
myrajendra
 
4 jdbc step1
myrajendra
 
Dao example
myrajendra
 
Sessionex1
myrajendra
 
Internal
myrajendra
 
3. elements
myrajendra
 
2. attributes
myrajendra
 
1 introduction to html
myrajendra
 
Headings
myrajendra
 
Forms
myrajendra
 
Views
myrajendra
 
Views
myrajendra
 
Views
myrajendra
 
Starting jdbc
myrajendra
 
Properties
myrajendra
 
Java.sql package
myrajendra
 
Interface callable statement
myrajendra
 

File management53(1)

  • 1. File Management Organization of data - Creating a file - Storing a file in required directory - Removing a file - Opening a file - Closing a file - Maintaining of file details - Name, Type, location, size , date and time of creation or modification - File Protection http://raj-os.blogspot.in/ 1
  • 2. File Attributes - Name - Type - Location - Size - Protection - Time, Date and User Identification http://raj-os.blogspot.in/ 2
  • 3. File Attributes Name - Given by the user - Only information that is kept in human readable form Type - Information required by systems that support different types http://raj-os.blogspot.in/ 3
  • 4. File attributes Location - A pointer to a device and to the location of the file on that device Size - Current size of file (in bytes or words ) - Max size allowed http://raj-os.blogspot.in/ 4
  • 5. File Attributes Protection - Access control information ( read, write and execute privileges ) http://raj-os.blogspot.in/ 5
  • 6. File Attributes Time, date and user identification - Creation - Last modification - Last use (Useful for protection, security and usage monitoring ) http://raj-os.blogspot.in/ 6
  • 7. Basic File Operations ( Minimal Set ) 1. Creating a file 2. Repositioning within a file 3. Deleting a file 4. Truncating a file 5. Reading a file 6. Writing a file http://raj-os.blogspot.in/ 7
  • 8. Basic File Operations 1. Creating a file • Allocation of space for the file in the file system • Making an entry for the new file in the directory http://raj-os.blogspot.in/ 8
  • 9. Basic File Operations 2. Writing a file • Use a system call specifying - Name of the file - Information to be written • Search directory for the associated entry • Keep a write pointer • Update write pointer after every write http://raj-os.blogspot.in/ 9
  • 10. Basic File Operations 3. Reading a file • Use a system call specifying - Name of the file - Address where to put the contents read • Search directory for the associated entry • Keep a read pointer • Update read pointer after every read http://raj-os.blogspot.in/ 10
  • 11. Basic File Operations 4. Repositioning within a file • Also known as file seek operation • Search directory for the appropriate entry • Set current-file-position to a given value http://raj-os.blogspot.in/ 11
  • 12. Basic File Operations 5.Deleting a file • Search the directory for the named file • Release all file space • Erase the directory entry http://raj-os.blogspot.in/ 12
  • 13. Basic File Operations 6. Truncating a file • File contents erased • Name and attributes of file unchanged http://raj-os.blogspot.in/ 13
  • 14. Other File Operations • Appending • Renaming Appending Add some information at the end of the file Renaming Name of file changed All other attributes unchanged http://raj-os.blogspot.in/ 14
  • 15. Basic file operations can be combined to implement other operations Ex : Creating a copy of a file - Create a new file - Read from old file - Write to new file http://raj-os.blogspot.in/ 15
  • 16. Other Desirable Operations Allow the user to get and set the various attributes of a file Ex : i) get the file length ii) set file attributes like file’s owner http://raj-os.blogspot.in/ 16
  • 17. Other Desirable Operations Most file operations involve searching the directory for the entry associated with the named file http://raj-os.blogspot.in/ 17
  • 18. To Avoid Constant Searching • Many systems open a file when file first is used • The operating system keeps a small table called the Open file table • Open file table contains information about open files • When a file operation is requested, an index into the open file table is used http://raj-os.blogspot.in/ 18
  • 19. Other File Operations When a file is no longer actively used, it is closed by the process and the O.S. removes its entry in the Open file table http://raj-os.blogspot.in/ 19
  • 20. Other File Operations • Some systems implicitly open a file when it is first referenced • Close it automatically when the program that opened the file terminates http://raj-os.blogspot.in/ 20
  • 21. Other File Operations Most systems require that a file be opened explicitly by the programmer with a system call ( open ) before that file can be used http://raj-os.blogspot.in/ 21
  • 22. File Type Usual extension Function Executable Exe, com, bin or none Ready to run machine language program Object obj, o Compiled, machine language, not linked Source code c, p, pas, f77, asm, a Source code in various languages Batch bat, sh Commands to the command interpreter Text txt, doc textual data,documents Word Wp, tex, rrf etc Various word processor Processor formats Library Lib, a Libraries of routines Print or view ps, dvi, gif ASCII or binary file in a format for printing or viewing Archive arc, zip, tar Related group of files for archiving or storage Fig : Common File Types http://raj-os.blogspot.in/ 22
  • 23. File Type One major consideration in designing a file system, and the entire operating system, is whether the operating system should recognize and support file types http://raj-os.blogspot.in/ 23
  • 24. File Type • If the operating system recognizes the type of a file • it can then operate on the file in reasonable ways • Ex : An attempt to print a binary-object form of a program file can be prevented http://raj-os.blogspot.in/ 24
  • 25. File Type To implement file types, include the type as part of the file name For Ex : letters , documents http://raj-os.blogspot.in/ 25
  • 26. File Type The file name is split into two parts - a name - an extension http://raj-os.blogspot.in/ 26
  • 27. File Type • The file name is usually separated from the extension by a period ( dot ) character Ex : paycalc. cpp • The name can consists up to 8 characters followed by a period http://raj-os.blogspot.in/ 27
  • 28. File Type The extension tells what the file type is • Extension can be up to 3 characters • System uses the extension to indicate the type of the file • Type of operations that can be done on that file For ex : .com , .exe & .bat extension are executable file http://raj-os.blogspot.in/ 28
  • 29. Summary In this class, you have learnt - file concept - Understand file operations - Know various file types http://raj-os.blogspot.in/ 29