File System – Linux has a hierarchical filesystem (directories within directories and files, and directories, and device drivers are treated as files). Filesystem supports 256 – character filenames avoid symbols and punctuation except for the dot (.). All command line entries are case-sensitive. Also, note that Linux uses the slash (/) rather than the backslash (\)
What is a File?
Files are the creation of data items stored on a disk or it’s a device that can store information, data, music, picture, movie, sound, books, etc. In fact whatever we store on the computer must be in form of a file. Files are always associated with devices like hard disks, floppy, discs, etc.
What is a directory?
A directory is a group of files Directory is divided into two types:
- Root Directory: There is only one root directory in our system. Which is denoted deleted by/(forward slash). It is the root of our entire file system and can not be renamed or deleted.
- Subdirectory: The directory under the root (/) directory is a subdirectory that can be created, and renamed by the user.
The file system begins with a directory called root the root directory is denoted slash (/). In the root directory, there are several other directories called bin, lib, usr, etc, tmp, and dev. Each of these subdirectories contains several files and directories called sub-sub directories.
These subdirectories are used to keep related files together and separate them from another group of related files.
- bin directory: Contain executable files for most of the command. It includes a binary executable file.
- lib: This directory contains a library function. The program used these library functions in the lib directory.
- dev: This directory is within files that control various input/output devices like printers, disk drives, etc. For each device, there is a separate file.
- etc: Binary executable files are usually required for system administration.
- tmp: This directory contains the temporary files created by Unix or by the user. These files are created for a temporary purpose. These files are automatically deleted when the system is shut down or restored.
- usr: This directory is associated with a particular user and it is created by the system administrator when the user creates an account for a different
- user: In the usr directory, there is another bin directory that contains additional command fields.