Files & Directories

Important Terminologies

File

A computer file is a digital container that stores information, data, or instructions in a structured and organized manner.

It can hold a wide range of content, including text, images, audio, video, software code, and more. Files are fundamental units of data storage and manipulation within a computer's file system.

Each file is typically identified by a name and is stored within a directory structure. Files are created, opened, edited, saved, and deleted by users or software applications. They allow for the preservation and exchange of data across different systems and platforms.

Various file formats exist, each tailored to specific types of data, and they define how the data is stored, interpreted, and presented. Files enable computers to handle complex tasks by providing a means to organize and access data efficiently, contributing to the functionality and versatility of modern computing systems.

File Extensions

File extensions are suffixes added to the end of a computer file's name, separated by a dot. They consist of a few characters and indicate the format or type of the file.

For instance:

  • .txt --> indicates a plain text file,

  • .jpg --> represents an image in JPEG format.

  • .py --> a python file extension

  • .java --> a java file extension

File extensions help both users and software identify how to handle a file, enabling compatibility and proper display or execution.

Directory

Commonly known as a folder, it provides a way to organize and store files and other directories in a hierarchical manner on a computer's file system.

Benefits:

  1. Organization: Directories help keep related files together, making it easier to locate and manage data.

  2. Hierarchy: Directories create a clear hierarchy that mimics how information is categorized and managed in real-world scenarios.

  3. Navigation: Users and applications can navigate through directories to access the files they need. This is often done through file managers or command-line interfaces.

  4. Isolation: Files in different directories can have the same name without conflict, as long as they're in different paths.

  5. Security: Directories can have permissions and access control settings applied to them, allowing for better control over who can access or modify the contained files.

  6. Cleanliness: Organizing files into directories reduces clutter in a file system and makes maintenance easier.

The $HOME directory

(often represented as ~ or referred to as the "home directory")

A concept in Unix-like operating systems, including Linux and macOS. It's a crucial part of the file system hierarchy and serves as the default directory where a user's personal files and settings are stored. Each user on a Unix-like system has their own unique home directory.

Last updated