Explanation of “Everything is a File” and Types of Files in Linux
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
That is in fact true although it is just a generalization concept, in Unix and its derivatives such as Linux, everything is considered as a file. If something is not a file, then it must be running as a process on the system.
To understand this, take for example the amount of space on your root (/) directory is always consumed by different types of Linux files. When you create a file or transfer a file to your system, it occupies some space on the physical disk and it is considered to be in a specific format (file type).
And also the Linux system does not differentiate between files and directories, but directories do one important job, that is store other files in groups in a hierarchy for easy location. All your hardware components are represented as files and the system communicates with them using these files.
Very resourceful article and a good read.
Hope this helps.
Have fun & enjoy!
Do you (people reading this thread) think the above post is useful?
I do. I enjoyed reading it, adding a few details to what I already knew. But there is no way to easily and quickly thank Onebuck. There are comments, fine, but I am imagining something as simple as "Mark this post as useful". It does not exist for first posts, from what I have seen.
Onebuck, please make a post with (possibly) just a link to #1, so me and more people may thank you.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Yep, that's one of the biggest differences between UNIX/Linux and Windows, in that Windows just treats files as storage of information, but on the other hand UNIX/Linux uses the file system as a "communications channel".
Do you (people reading this thread) think the above post is useful?
I do. I enjoyed reading it, adding a few details to what I already knew. But there is no way to easily and quickly thank Onebuck. There are comments, fine, but I am imagining something as simple as "Mark this post as useful". It does not exist for first posts, from what I have seen.
Onebuck, please make a post with (possibly) just a link to #1, so me and more people may thank you.
(:
Thank you! I post this type of thread that contains useful information to our LQ members. I read a lot and find jewels then I attempt to share those.
For original posts a member can give rep on the left side of post by clicking on the scale. You can then submit a comment when you are giving rep.
Trouble is, although something might have a place in the filesystem, it does not necessarily correspond to "space on disk." For instance, the /proc, /sys, /dev "directories" are purely synthetic. Likewise, a filesystem-location might correspond to a socket.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.