
- OS - Home
- OS - Needs
- OS - Overview
- OS - History
- OS - Components
- OS - Structure
- OS - Architecture
- OS - Services
- OS - Properties
- OS - TAT & WAT
- OS Processes
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling Algorithms
- FCFS Scheduling Algorithm
- SJF Scheduling Algorithm
- Round Robin Scheduling Algorithms
- HRRN Scheduling Algorithms
- Priority Scheduling Algorithms
- Multilevel Queue Scheduling
- Context Switching
- Operations on Processes
- Lottery Process Scheduling
- Predicting Burst Time SJF Scheduling
- Race Condition Vulnerability
- Critical Section Synchronization
- Mutual Exclusion Synchronization
- Process Control Block
- Inter Process Communication
- Preemptive and Non-Preemptive Scheduling
- Operating System - Deadlock
- Introduction to Deadlock in Operating System
- Conditions for Deadlock in Operating System
- OS Synchronization
- Operating System - Process Synchronization
- Operating System - Critical Section
- Operating System - Semaphores
- Operating System - Counting Semaphores
- Operating System - Mutex
- Operating System - Lock Variable in Process Synchronization
- Operating System - Turn Variable in Process Synchronization
- Operating System - Bounded Buffer Problem
- Operating System - Reader Writer Locks in Process Synchronization
- Operating System - Test Set Lock in Process Synchronization
- Operating System - Peterson Solution in Process Synchronization
- Operating System - Monitors in Process Synchronization
- Operating System - Sleep and Wake in Process Synchronization
- OS Memory Management
- OS - Memory Management
- OS - Virtual Memory
- OS Storage Management
- File Systems in Operating System
- Linked Index Allocation in Operating System
- Indexed Allocation in Operating System
- Structures of Directory in Operating System
- File Attributes in Operating System
- Operating System - Page Replacement
- Operating Systems - Thrashing
- Belady’s Anomaly in Page Replacement Algorithms
- Optimal Page Replacement Algorithm
- Operating System - Types
- Types of Operating System
- Batch Processing Operating System
- Multiprocessing Operating System
- Hybrid Operating System
- Monolithic Operating System
- Zephyr Operating System
- Nix Operating System
- Blackberry Operating System
- Garuda Operating System
- Tails Operating System
- Clustered Operating System
- Haiku Operating System
- AIX Operating System
- Solus Operating system
- Tizen Operating System
- Bharat Operating System
- Fire Operating System
- Bliss Operating System
- VxWorks Operating System
- Embedded Operating System
- Single User Operating System
- OS Miscellaneous
- OS - Multi-threading
- OS - I/O Hardware
- OS - I/O Software
- OS - Security
- OS - Linux
- OS Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
File Attributes in Operating System
A file stores content or information on a disk. It is the smallest unit for storing data, and without files, it is impossible to store any information on a system.
In addition to storing data, a file also possesses attributes that provide metadata or details about the file itself. These attributes play an essential role in managing and handling files, regardless of their content.
What is File Attributes in Operating System?
File attributes are the special parameters that are used to store the metadata of the specified file. Here, metadata is data which provides the information about the file rather than the content of the file. It specifies the behaviour, characteristics, and properties of the file, which helps operating system and users how to manage files.
The attributes of files are used to manage the visibility, access and other functionalities of the file. It can also provide information about the file, like when it was created, last modified, or last accessed.
We can modify the attributes of the file according to the operating system, for example, if we are using Windows, then we can modify the attributes of the file by right click on the file, then select properties, and then we can modify the attributes. If we are using macOS, then right-click on the file and then select the get info option to set the file attributes.
Different Types of File Attributes in OS
Operating system provides a variety of attributes for a file. Using these attributes, we can specify the properties of the stored file so that we can access it very easily. The attributes supported by the operating system are as follows:
Name: The name attribute is used to store the name of the file. It is of string type and provides unique and human read identity to the specififed file. It prevents users from saving files with duplicate names.
Identifier:The identifier attribute is used to store the extension of the file. It specifies what type of data is stored in the given file. The most commonly used file extensions are − .txt, .mp4, .jpg, etc.
Types: The Type attribute is also used to specify the type of the file such as zip file, audio file, video file, etc.
Location: The location attributed is used to specify the location of the file. Or we can say that it is used to specify the directory path so that we can easily locate the file.
Size: The size attribute is used to specify the size of the file in Kb, Mb, etc.
Protection:The protection attribute is used to provide information about the access control of the file. It is commonly used to provide security to the given file by applying the permissions. Using this, we can control who can read, write, and execute files.
Time and date: This attribute is used to provide information about when and at what time the file is created or modified.
Read-only Flag: The read-only flag determines whether the file is read-only or not. If the value of this file is set to 0, it means that the file can be read or written. Or if the value of the flag is set to 1, then that means the flag is read-only.
Hidden Flag: The hidden flag determines whether the file is hidden from the normal directory or not.
System Flag: The system flag is used to mark the file as a system file. It is hidden from the regular user to avoid modifications. It is only used by the operating system.
Archive Flag: The archive flag is used to mark the file as a needing system.
ASCII/Binary Flag: The ASCII/Binary flag is used to specify the format of the file content either in ASCII mode or Binary mode. If the value of this flag is 1, then that means the file is an ASCII file. Otherwise, the file is binary.
Random Access Flag: The random access flag allows the user to directly access any part of the file. It allows random read and write operations.
Temporary Flag: The temporary flag marks the specified file temporarily and can be deleted after it's used. It is commonly used for temporary storage or caching.
Lock Flag: The lock flag is used to lock the file. It keeps files from multiple access. If the value of this flag is 0, then that means the file is unlocked, it is not.