LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-22-2010, 06:47 AM   #1
pavan.manipal
Member
 
Registered: Mar 2009
Posts: 42

Rep: Reputation: 15
where does file system keeps file name in the file system data structure


Hi,
I want to know where does the file system keeps information of all files present in the file system. inode only keeps the information of size,attribs, other than the name of the file.

Ex :If i want to access a file a.txt in the file system , how does the read operation takes place , and if i want to write the same a.txt file under same partition or directory how does file system finds the duplicate file ,

Here my ultimate doubt is if a write operation has to take place ,a read operation must take place to get the file name if it is already present or not in the filesystem (directory).

If i am not clear please let me know where i am not clear.
 
Old 02-22-2010, 07:01 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
I see 2 questions here:

1. The inner workings of the filesystem--i.e. where info is actually stored.

2. The mechanics of writing a file.

In the latter case, I assume that the system calls behind--e.g--the "mv" command include a read operation to see if the file exists. As for the 1st question, Use Google to look up the filesystem spec. for the system you are using.
 
Old 02-22-2010, 07:03 AM   #3
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,363
Blog Entries: 52

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
The filename is typically an entry in the directory/folder that 'contains' the file.

There is not a one-to-one correspondence between filenames and inodes. There can be more than one filename that points to the same inode.

And yes, if you open a file, the open has to read the directory entry in order to find the inode, and read the inode entry as well.

Last edited by neonsignal; 02-22-2010 at 07:07 AM.
 
Old 02-22-2010, 07:19 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,157
Blog Entries: 3

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
Hi,

Look at 'Linux File System' section of 'Slackware-Links' for a lot of helpful information that will aid to understanding the filesystem.


The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
1 members found this post helpful.
Old 02-22-2010, 07:38 AM   #5
pavan.manipal
Member
 
Registered: Mar 2009
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by onebuck View Post
Hi,

Look at 'Linux File System' section of 'Slackware-Links' for a lot of helpful information that will aid to understanding the filesystem.


The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

Thank u very much.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linpus Fedora after saving files to file system, CAN'T open FILE SYSTEM from desktop! remiwa Fedora 2 01-07-2009 07:28 AM
Linux File System Structure Questions mohit.saha Linux - Newbie 1 03-28-2008 05:54 AM
the on-disk structure of the ext3 file system SeRGeiSarov Linux - Software 1 06-04-2007 01:00 PM
File system/structure question ashley75 Linux - General 1 05-17-2005 09:02 PM


All times are GMT -5. The time now is 04:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration