filesystem

Discussion in 'General Linux' started by Prashant Agrawal, Aug 26, 2013.

  1. Prashant Agrawal

    Prashant Agrawal New Member

    Joined:
    Aug 25, 2013
    Messages:
    6
    Likes Received:
    1
    Why can not we store a folder in a file....as we can do the vice versa

     
    DevynCJohnson likes this.
  2. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Joined:
    May 21, 2013
    Messages:
    1,635
    Likes Received:
    1,276
    Think of a folder like a real paper folder and think of a file like a piece of paper. The folder cannot go in a paper. Does that answer your question? If it has click "Like" and "Best Answer".
     
  3. Prashant Agrawal

    Prashant Agrawal New Member

    Joined:
    Aug 25, 2013
    Messages:
    6
    Likes Received:
    1
    What you are saying is just a logical answer to my question.....I want a technical answer in terms of the filesystem....why it is not possible technically
     
  4. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Joined:
    Aug 4, 2012
    Messages:
    1,854
    Likes Received:
    652
    A directory is a unique type of file that contains only the information needed to access files or other directories. As a result, a directory occupies less space than other types of files.

    So technically, a directory IS a file. But this file has information that contains the locations and other needed information on other files that are "IN" it. We must remember that the files are all on the same "Disk Plate". And that each file has a 3d location. So really files are not "IN" directories.

    Source:
    http://pic.dhe.ibm.com/infocenter/a....baseadmn/doc/baseadmndita/filesys_struct.htm

    More:
    http://en.wikipedia.org/wiki/Directory_(computing)
     
    Prashant Agrawal likes this.
  5. anubhav tiwari

    anubhav tiwari New Member

    Joined:
    Jul 30, 2013
    Messages:
    11
    Likes Received:
    2
    Directories and files both are the types of files in linux,both are different just according to their functionality as a Directory can contain information and files in it,while a file can only hold information,Data but can not hold other files, all these comes under inode structuring of files and directories. :)
     
    DevynCJohnson likes this.

Share This Page