Free Article titled - The Top Ten Concepts For People New To Linux - Number 5, Inodes Get Free Content For Your Website

Free Articles on Computer and many other topics
Another free Computer article for you by Levi Reiss
Titled: The Top Ten Concepts For People New To Linux - Number 5, Inodes
Get the Computer category RSS Feed Computer RSS Feed

Print This Article Instant Copy Text

Please support the Sponsors of uPublish.info

The Top Ten Concepts For People New To Linux - Number 5, Inodes

By: Levi Reiss
Posted on: 2008-07-12
Downloads: 32

Article Summary: People realize Linux's many advantages over Microsoft Windows. Of course, you should be familiar with some basic Linux concepts. This article discusses Linux inodes. Other articles discuss files, directories, permissions, users, processes, shells, programming, the graphical user interface, and LAMP, the open-source (free) suite Linux, Apache, MySQL, and PHP. Look for our articles on Linux advantages over Windows.

Many aspects of Linux functionality are found, albeit in a different form in Windows. Inodes, the subject of this article, are an exception to this rule. Given the practicality of inodes, Windows now contains an imitation of this functionality. But really, to take full advantage of this somewhat complicated concept, you'll have to go to Linux or Unix.

So what are inodes and why would anyone want to use them? Inodes are the internal description of a file. As we will see below, the specific inode contents for a given file are different in memory and on disk. But the key to the inode is that a single file may have different names. Why would anybody want to do that? One of the most important reasons is that a user may access a shared file by an intuitive name. Accounting department users could give a certain file an accounting-style name, while users from the marketing department could access this same file by a name that makes sense to them. This functionality alone makes inodes worth having.

Furthermore, let's say that by accident the "accounting" file was deleted. Accounting users could still access that file if they knew the "marketing" name. Remember, we are talking about one single file that has different names. People don't have to know about these complications to be able to access the file. The extra processing is carried out behind the scenes.

Now let's examine inodes more closely. The inode on disk contains the following information: file owner identifier, file type, file access permissions, file access information, number of links, list of data addresses, and file size. The file owner identifier specifies the file owner and the group owner as discussed in our article on permissions and groups. The file type indicates whether we are talking about a regular file, a directory, or something else. The file access permissions denote the permissions, also discussed in a previous article. A given file may have different permissions for different users, for example accounting users may have permission to read and modify the file while marketing users only have permission to read it.

File access information specifies when the file was last accessed, last modified, and when the associated inode was last modified. The number of links indicates the number of names that the file has. In our example, the file has two links. If either accounting or marketing delete the file (assuming that they have such permission) the number of links is reduced to 1. But the file is still there and the number of links could be increased.

The inode on disk provides a list of data addresses; the single file may be scattered across the disk. The final value is the size of the file in bytes.

The inode in memory contains all of the above information plus additional information, for example, whether the file is available for processing (someone else may be using it) and whether someone is waiting to process the file. Remember, several people may be using Unix or Linux. If there were no file usage control two different people in accounting could pay a bill at the same time. Windows doesn't have this problem; it's not a multi-user system.

The ln command is used to create a link to a given file. For example, ln acct1 mark1 links the mark1 file to the acct1 file, in other words makes the name mark1 available for the acct1 file. It's the same file, but with a new name. The ls 'i command provides information about the file including the number of links (the number of names for the file.)

The next article in this series discusses the Linux kernel and processes.

Article Source: http://www.upublish.info

About the Author:
Levi Reiss
Levi Reiss has authored or co-authored ten books on computers and the Internet. He loves the occasional glass of wine as exemplified by his wine websites including www.theworldwidewine.com. He teaches Linux and Windows operating systems plus other computer courses at an Ontario French-language community college. Visit his new website http://www.linux4windows.com which enables you to download and run Damn Small Linux on even outdated Windows computers.

Free Articles on Computer and many other topics
Free Articles on Computer and many other topics - Add this category to your RSS Reader

Please Rate this Article

 

Not yet Rated

Click the XML Icon Above to Receive Computer Articles Via RSS!


Above are more free articles on Computer
U Publish Articles

© 2005-2008 uPublish.info All Rights Reserved.
Use of our service is protected by our Privacy Policy and Terms of Service
U Publish - Source for Free Articles - Free Reprint Articles - Free Article Publishing