Types Of File Operations / What are file operations?

Hello friends, In this blog post(Types Of File Operations) I am going to explain to you file operations, as you all know files are used to store data information and this information can be retrieved with allowed permission when needed.

Each operating system has a system called to make basic operations on files like the creation of the file, reading from a file, writing to the file, etc. The following are some basic operations on the file(Types Of File Operations).

Creating file operations: this operation is used to create a file. It requires two basic steps. first is to find the space for the file in the file system and the next is to make an entry in the directory for this file. This entry includes the name, size, and location of the file|Types Of File Operations|

Reading from file operations: The system call that performs the read operation requires two attributes – one is the file name and the other is the block, where information is kept after reading|Types Of File Operations|

Writing to file operations: The system call that performs the write operation into a file requires two attributes – one is the file name in which data is to be written and the other is the information that is to be written.

Repositioning within file operations: A file is repositioned from one location to a new location by just reading the file entry in the directory and modifying the location attribute with a new value. This operation does not require actual I/O.

Deleting file operations: In this operation, file entry is erased from the directory, and all the space allocated to the file is also released.

Truncating file operations: In this operation, only the contents of files are erased and all other attributes of the file remain unchanged except file size.

Open file operations: Before operating on a file, a process must open it. The purpose of the open file is to permit the system to read the attributes and list of disk addresses into the main memory for rapid access on later calls.

Close file operations: To free the internal table space, when all the accesses have finished, the file should be closed.

Append file operations: This operation is used to add data to the end of the file. Some system that provides a minimal set of system calls do not generally have append, but some other systems provide multiple ways of doing the same thing, and this system sometimes has to append.

Seek operations: Seek file operations are used to locate a location where to take the data. One common approach is a system call, which is used to seek the file pointer from a specific place in the file.

Rename operations: Rename operation is used to change the name of the existing file.

Set attributes operations: Some attributes of files are user-settable and can be changed after the file has been created. This system call makes that possible.

Get attributes operations: Get attributes operations are used to return the current value of attributes to the caller program or user.

You can also go through a few more amazing blog links below related to operating systems:

disk scheduling क्या होती है…
FAT32 Advantages and Disadvantages…
Overlay advantages and disadvantages in programs…
What is the use of Cache Memory…
What is Linker? Why is it required?…
types Of File Operations…
What are the file Organisation and its types…
Dijkstra: Bankers Algorithm For Deadlock Avoidance…
What is a thread in the operating system with an example…
Cache Memory In Hindi…
Linker In Hindi…
What Are Multithreading Models in Hindi…
Dynamic Storage Problem In OS In Hindi…
Process states in the Operating system in Hindi…
FAT32 Advantages And Disadvantages In Hindi…
Critical Section Problem With a Simple Example…
Critical Section Problem In OS In Hindi…
Dijkstra Algorithm In Hindi|Banker’s Algorithm In Hindi…
What Is Dynamic Storage Problem…
What are the Fork and Exec system calls…
Multithreaded Process: Benefits & Models…
The Process States In Operating System…

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP|Types Of File Operations|

Hope! you would have enjoyed this post about types of file operations.

Please feel free to give your important feedback in the comment section below|Types Of File Operations|

Have a great time! Sayonara!

Anurag

I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.