In Detail: UNIX File Systems
(Page 1 of 5 )
The dream of every designer is to make something that works perfectly, or at least almost perfectly. Achieving this goal requires an investment of countless hours and effort. Additionally, most of the time you'll need to take care of many details. During our previous meeting, I presented the general concept of the file system in UNIX and the rights system that governs UNIX systems. Now we need to look into the details of the file system.
This article will explain concepts like time stamps on files, symbolic and hard links, the mount command and a couple of other ideas that will help you later on. The article is UNIX/Shell Programming oriented. It will present some of the theories that you can use with these technologies. Of course, the most important tool remains the terminal.
If you missed my previous articles, please make sure you read them. Otherwise, the whole picture will not be clear. Now let us get straight to the subject. Time stamps on UNIX files will show you the last time a file was messed with. There are three types of time stamps, and every file contains this information inside the i-node structure (which I will explain later on).
Time stamps are in fact big integer numbers inside the structure. This is the UNIX timestamp. This represents the number of seconds elapsed since January 1, 1970, given in a concrete moment. We can list these stamps with the help of the ls command. To sort files by their timestamps, we will also add the -t option.
1) The last access time (atime):
ls -ltu
2) The modification time (mtime):
ls -lt
3) The last time a status change to the rights of the file was made (ctime):
ls -lct
Go ahead and start up your terminal. Make a couple of files; change the rights on them and experience how this works. This is worth at least the effort you've invested into reading this article so far.
Next: Mounting file systems >>
More Miscellaneous Articles
More By Gabor Bernat