Click to Play

Playing With Bots
Technically, you’re not supposed to show the Google Bot something different from what you’d show a human user. Netconcepts president Stephon .Spencer...

Recent Articles

A Guide To Linux Communities
Are you a new Linux user? Fantastic! Welcome to the world of freedom. Freedom of choice, freedom of expression, freedom from vendor lockin. You've made an excellent choice. Now that you've chosen...

Adobe AIR Ready For Linux
Adobe AIR for Linux Alpha-Release is available on Adobe Labs. It is a pre-release version and is alpha-ish at best. About a month earlier, Adobe shipped AIR v1.0 for Windows and Mac but delayed the Linux...

Linux-Based Everex GPC Pulled From Wal-Mart Shelves
Price-wise, we think a $200 PC is hard to beat. Wal-Mart (and/or the store's customers) apparently found fault with something, however, as the company has decided to dedicate its shelf space to something else.

Moving a Subversion Repository from Windows...
I recently had to move a subversion (svn) repository to another server. The repository was on a Windows server and had to be moved to a Linux server.

Lenovo Finally Releases SuSE Installed Thinkpads
After a bit of a delay, Lenovo has finally released it's Thinkpads with Linux pre-installed. The company first mentioned it's plans to do just that all the way back in August, calling for a fourth-quarter 2007 release.

Linux Expands Even Further Into The Enterprise
Linux adoption extends deeper into the corporate enterprise as companies start picking up on the latest versions of Linux for ordinary users. Linux desktop has seen a lot of adoption in smaller companies...



06.11.08

On A Linux System Everything Is A File

By Praval Singh

A Linux system, just like any *NIX based system doesn't differentiate between a file and a directory, since a directory is just another file which contains names of other files. Applications, programs, documents, services, images and just about everything else on a Linux operating system is a file!

Let's hope that our earlier article - Which Linux distro is right for you? - helped you decide a distro suitable for you. With the assembly of a complete Linux machine, it's time now to look into the architectural design of the operating system and look how robust Linux is with an efficient file management system it has. We shall now dive in to understand the file system and the file hierarchy of a Linux system.

A common description of the UNIX system, which also holds good for a Linux operating system says,

On a UNIX system, everything is a file; if something is not a file, it is a process.

This statement holds good because there are special kind of files that are more than - just files, say - pipes and sockets, for that matter. But, saying that everything is a file is an acceptable generalization, just for simplicity. A Linux system, just like any *NIX based system doesn't differentiate between a file and a directory, since a directory is just another file which contains names of other files. Applications, programs, documents, services, images and just about everything else on a Linux operating system is a file! Even the input and output devices are considered as files, according to the Linux system.

Call Today For a Free Domain Consultation

In order to manage all these files in an organized and orderly fashion, we think of them in a tree-like structure on the hard disk. We shall now continue to use this image of the directory while we shall peep into the roles of each leaf of the tree. The picture below says it all.

Linux Filesystem Basics

Image from Linux Config

Linux Filesystem BasicsIn Linux, everything is a file.
The file system where a Linux distro is probably installed is either ext2 or ext3 and is referred to as data partition. The other important partition is known as the swap partition which works as an extended physical memory. It is generally advisable for the swap partition to be 1.5 times the amount of physical memory installed on the system.

That was a picture of the file organization in a Linux operating system. Linux also has a remarkable support for a large number of file systems - ext, ext2, minix, umsdos, msdos, vfat, proc, xia, smb, ncp, sysv, iso9660, hpfs, affs, ufs, etc. The file system, as we saw, is represented hierarchically with '/' (root) being the top most level. Each new file system is added into a single file system tree as and when it is mounted.

All the file systems are mounted onto a directory and the files of the mounted file system form the existing contents of that directory. This directory is called the mount directory or mount point. When the file system is unmounted, the mount directory's own files are once again revealed. This great feature of Linux systems to enable on-the-fly mounting and un-mounting of various file systems without the need of fetching different drivers, makes them stand apart. This also gives the users and developers freedom to choose from a variety of file systems to handle their files.

The kind of organization Linux has for the files is a good reason in making Linux systems more secure. The estimate of how strong this architecture is can be made by the fact that there has hardly been any noticeable change in this design over the past decade. So, this means we're running a system which has deep underlying roots!

Comments


About the Author:
Praval Singh is a contributing writer for Brajeshwar.com.
LinuxProNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com DevWebPro.com


About LinuxProNews
LinuxProNews is a collection of news and commentary designed to keep you in step with the ever evolving landscape of Linux environments. Opensource News and Advice for Linux Professionals




-- LinuxProNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2008 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article



Opensource News and Advice for Linux Professionals LinuxProNews News Archives About Us Feedback LinuxProNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact