Unix Filesystem: Overview & Types | What is the Unix Filesystem?
What are the three types of files in Unix?
The three types of files in Unix are ordinary, directory, and device files. Ordinary files are what users access for their needs, directory files store other files, and device files help run attached devices such as printers.
What is the file system in Unix?
The file system in Unix is a hierarchical one that resembles a rooted tree. The top of the tree is the root with directories branching from the root.
How do I find the file system in Unix?
The file system in Unix can be found in a command terminal or prompt. Graphic user interfaces may also be used to simplify the user experience.
Unix filesystem is the governing method of data storage, retrieval, and access that is used by computers running Unix-based operating systems. All data in Unix is treated as a file, so the file system in Unix is hierarchic where it will assign a position in a large rooted tree of paths and files to help access the data when it is needed. The unified nature of the filesystem's organization method means that neither a user nor the computer needs to search multiple sets of directories to find a particular file.
Files and File Attributes
The term "files" refers to what each piece of data is categorized as in Unix. A file is a collection of data that is related in some form. Everything in Unix is treated as a file, so there are different kinds. Files can be pictures, text, audio, and much more. File attributes are characteristics by which the filesystem can organize the information in a file. Attributes do not involve the contents of the file but can include:
- File type — This can be broken down into ordinary, directory, and device files. Ordinary files are the ones that contain useful data, directory files are for organization in the filesystem, and device files are for recognizing external devices such as printers and scanners.
- File name — The file name refers to how each file is recognized in the system.
- File size — This is the physical amount of storage space the file occupies.
- File owner — The owner is the user or computer that created the file.
- File protection level — A file can be password-protected or encrypted to ensure the safe storage of sensitive information.
The Unix filesystem uses file attributes to help organize files within the operating system. This then works with the hierarchy of the filesystem to sort and contain files in a manner that makes them easily accessible.
File systems work by organizing files in a hierarchy system that can be described as a rooted tree. This means that the beginning of the file system is a single point known as a root, and all ensuing files branch from that root. Each branch is a directory, which is a file that contains other files. A directory file does not contain data with which a user can interact, but it contains information about the contents of the directory. A file system can have multiple directories and subdirectories, but all of it comes back to the root, which is designated by a forward slash symbol.
Navigating a Unix file system can be accomplished by understanding the various directories where files are stored. In a prompt screen, the user will enter the path in which they wish to take to find a specific file. If someone were to look for a document they wrote and stored in their home directory, they would enter /home/username/file_name. This would then take the user directly to the file that they are seeking.
Types of Files in Unix Filesystem
The Unix filesystem employs many different types of directories. Some of the following examples are common directories for Unix.
- /bin — Binary directories contain executable command files.
- /dev — Device-specific files reside here.
- /etc — These are system-specific files.
- /home — The user directory and files are in the home directory.
- /media — When a user inserts a storage device or other USB device into the computer, this is the directory.
- /lib — Library files are reference files for computer operation.
Unix Filesystem vs. Linux Filesystem
Linux is an operating system much like Unix, but it is an open-source system. This means that users can add to and modify the source code of the operating system. The Linux filesystem is very similar to the Unix filesystem. They both employ the rooted tree architecture and use the same method of organization via directories. Where they differ is that Linux supports a variety of partition types that Unix does not, including FAT and FAT32, which are used on many home computers for file storage.
![]() |
The Unix filesystem is used on several computers in business settings as well as personal computing. Due to its manner of operation and file storage, the Unix filesystem is used on servers as well as other enterprise-level computers.
An instance of the Unix filesystem would look similar to the image that is pictured here.
The root is the forward slash at the top of the diagram with the various directories falling below the root. The files in each directory would proceed from the directory and ensuing subdirectories until the destination file was found. Accessing these files is done by typing in the path from the root through all the directories that will take a user to the file. In an operating system that uses a graphic user interface, this would be accomplished by clicking on an icon of the file.
The Unix filesystem is how files are organized and used within the Unix operating system. The file system stores, retrieves, and uses information based on the file system structure. In Unix, all data is treated as a file with ordinary files being the files that users access containing images, text, or other data. Directories are files that contain information about other files and are how all files are stored in Unix. Within directories, file attributes are information about the file that helps to organize files based on information about the file and not the contents. Some file attributes include its size, name, file type, and the owner of the file. Accessing files in the Unix file system starts with the root of the filesystem and follows directory paths to where a file is located. Linux has a similar type of filesystem to Unix in that it uses a rooted tree hierarchy and treats all data as files. The difference between the two is that Linux supports more popular partitions for storage such as FAT32.
Register to view this lesson
Unlock your education
Become a Study.com member and start learning now.
Become a memberAlready a member? Log in
Go backResources created by teachers for teachers
I would definitely recommend Study.com to my colleagues. It’s like a teacher waved a magic wand and did the work for me. I feel like it’s a lifeline.
