Need little help in understanding UNIX file system.

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Need little help in understanding UNIX file system.
# 1  
Old 04-08-2016
Need little help in understanding UNIX file system.

statement 1 :
I see everyone saying Unix follows a tree like hierarchial structure.
Statement 2:
Unix file system has four blocks
1.boot block
2.super block
3.inodes
4.data block
My question is , in which of the above four blocks , the hierarchial structure comes.?? How could we corelate both of the above statements.please explain.
# 2  
Old 04-08-2016
The file/directory structure results from mapping directory contents onto the disk. It is metadata. The hierarchy does not exist at the physical disk level. One physical file can be located in data blocks in unrelated places on a single disk. Same thing for a directory.
inodes are the 'entry' point - kind of like an 'address book' for the physical file.
# 3  
Old 04-09-2016
Quote:
Originally Posted by Narendra Eliset
My question is , in which of the above four blocks , the hierarchial structure comes.??
To expand on what Jim said: the hierarchical structure (i'd rather call it recursive) comes from the fact that (if we take a somewhat simplified outlook) UNIX filesystems consist of two things:

- files
- directories

where the directories themselves consist of other directories and files (this is where the recursion gets in).

There are other (non-hierarchical) concepts to handle disk space:

in VM/CMS and its descendants (IBM mainframe computers) there are single disks (informally called "3380" or "3390" devices because they are virtual disks coming from such devices) without any directories. You "mount" (=attach to a virtual machine) such a virtual disk with a certain letter and this letter becomes the last part of the filename, which consists of 8 characters plus 8 characters extension, i.e. "FILENAME TEXT A2" which is a file named "FILENAME" and with extension "TEXT" residing on a disk mounted right now as "A". The "6" is the filemode, which tells the system how to handle a file (for instance there is one meaning "remove after being read", which is used for incoming mail).

In Windows and its predecessor DOS there is a somewhat hierarchical system in place but there are "drive letters" breaking up this hierarchy. While a UNIX system will always have exactly one tree-like structure, regardless of how many disks are used to create that filesystem in DOS there will be a letter for each disk (non-hierarchical) but a hierarchical directory-structure within it.

In OS/400 (another classic IBM midrange architecture) there is no filesystem (in the classic sense) at all, because the system uses its built-in database (DB/2) to store and retrieve files. Basically one retrieves information using some sort of SQL. Furthermore the system makes no difference between memory and disk: everything is one flat space and to write a file to disk ones moves it from one location (which represents memory) to another (which represents a disk or maybe some other device).

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX file system to Linux file system migration

We would be migrating UNIX file system to Linux file system. We do have many directory and sub directories with files. after migrating unix to linux file system , i want to make sure all the files has been copied ? What would be the best approach to validate directory ,sub-directory and file... (1 Reply)
Discussion started by: balajikalai
1 Replies

2. UNIX for Dummies Questions & Answers

Understanding File System

Can anybody provide me some good articles / links which will help me understand linux file system internals? I want to understand how a file when accessed from user mode through its file name resolves to particular memory location on memory. Where does the super, dentry and inodes come into... (2 Replies)
Discussion started by: rupeshkp728
2 Replies

3. UNIX for Advanced & Expert Users

UNIX FILE SYSTEM

Dear All, We are using COMPAQ DS -10 machines with UNIX 4.0F System is behaving abnormal some directories shows full and they should not be . here is df -k output of a machines file system----1024 block-----used--available--capacity--mounted on /dev/rz17h-----8680793----- 1 --- ... (1 Reply)
Discussion started by: akash.jahangir
1 Replies

4. UNIX for Dummies Questions & Answers

Unix file system

which one is correct explanaton for unix file system a. Explaining about directory hierarchy or b. Explaining about boot block , super block? (1 Reply)
Discussion started by: gwgreen1
1 Replies

5. Homework & Coursework Questions

fork system call understanding

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: i have a problem in understanding the behaviour of fork . i understood fork as to create a new process and... (4 Replies)
Discussion started by: MrUser
4 Replies

6. Programming

compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies

7. HP-UX

Understanding File System

Hey guys im confused with the difference of these filesystems /bin, /sbin, /usr/bin, /usr/sbin. They all look like the same. (2 Replies)
Discussion started by: sbn
2 Replies

8. UNIX for Dummies Questions & Answers

Understanding System Vish startup scripts

I'm trying to get a clear picture of how startup scripts are executed during bootup. When run-level N is entered, the scripts in /rcN.d are executed. I understand that the S* scripts are executed in numerical order during bootup. What I don't understand is if the K* scripts are executed... (0 Replies)
Discussion started by: darkmatter14B
0 Replies

9. UNIX for Dummies Questions & Answers

How do I send a file as an attachment (gzip file) on a Unix system

Hi, How do I send a file as an attachment (gzip file) on a Unix system ? Using sendmail. Please help me. :confused: (3 Replies)
Discussion started by: lacca
3 Replies
Login or Register to Ask a Question