Author Topic: Linux Directory Structure  (Read 6396 times)

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Linux Directory Structure
« on: November 25, 2004, 02:39:42 pm »
What's the basic/general Linux directory structure?  I'm still trying to figure it out and I keep forgetting where in the maze of directories to find certain things Im looking for.  I've noticed the that directory structure appears to change slightly from one Linux Operating System flavor to another.  Is there a link to an image of the directory structure and it's meanings?  Which directory contains what subject, etc?

With this information I should be able to navigate through the Terminal screen better.

Thanks in advance!
« Last Edit: November 25, 2004, 03:01:31 pm by TonyOlsen »
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

icey

  • Newbie
  • *
  • Posts: 7
    • View Profile
Linux Directory Structure
« Reply #1 on: November 25, 2004, 04:16:00 pm »
Hope this helps you: Filesystem Hierarchy Standard.
 
Edit:
 
That was a link to Filesystem Hierarchy Standard v2.3 but you're probably best checking the FHS v2.2 as that's more akin to the Zaurus filesystem: FHS v2.2 Requirements, check the table of contents for much more information.
« Last Edit: November 25, 2004, 04:25:53 pm by icey »
.........
Registered Linux User #174367
Register @ http://counter.li.org/

• Zaurus SL-C760
• pdaXrom v1.0.5
• Symbol Wireless Networker
• Transcend 45x 256MB CF Card
• Maxell 256MB SD Card

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Linux Directory Structure
« Reply #2 on: November 25, 2004, 04:44:27 pm »
Wow!  That's great!  Thanks!

Are there any additional links talking about the /home/zaurus, /home/QtPalmtop, /home/sharp, and other Zaurus-specific diretories and sub-directory structures?  (There seems to be a LOT of structure under these)

While looking around the links above, I found:
Quote
/home is a fairly standard concept, but it is clearly a site-specific filesystem.
...so maybe there's a sharp document/website that talks about the SL-C860 version of the /home/ directory.
« Last Edit: November 25, 2004, 04:47:39 pm by TonyOlsen »
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Linux Directory Structure
« Reply #3 on: November 25, 2004, 04:52:08 pm »
/home/zaurus/Applications/.. appears to be the Linux equivalent of Window's C:\Program Files\... directory.  It isn't needed (since you could simply place the executables in the /bin/ directory).  Does that sound right?
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

icey

  • Newbie
  • *
  • Posts: 7
    • View Profile
Linux Directory Structure
« Reply #4 on: November 25, 2004, 05:54:10 pm »
You're welcome! The distinction of /home/zaurus/Applications seems to be that it's specifically for Qtopia applications; it does function as an equivalent of "Program Files". The contents of bin (and sbin) directory would be analogous to the executables in Windows/System32/.
 
I haven't seen any documents specific to the Zaurus/Qtopia way of arranging files but with a fairly good understanding of the general Linux filesystem layout, I haven't been at all overwhelmed by the small additions and idioms which appear on the Zaurus. Qtopia add-ons seem to be reasonably simple and sensibly placed.
 
BTW, /home/zaurus is the home directory of the default user account on the zaurus. You are automatically logged in as the user "zaurus".
 
Edit:
I just found this!
« Last Edit: November 25, 2004, 05:58:47 pm by icey »
.........
Registered Linux User #174367
Register @ http://counter.li.org/

• Zaurus SL-C760
• pdaXrom v1.0.5
• Symbol Wireless Networker
• Transcend 45x 256MB CF Card
• Maxell 256MB SD Card

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Linux Directory Structure
« Reply #5 on: November 25, 2004, 06:39:50 pm »
Thanks!   The link is also very helpful!
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Linux Directory Structure
« Reply #6 on: November 25, 2004, 08:10:25 pm »
Quote
/home/zaurus/Applications/.. appears to be the Linux equivalent of Window's C:\Program Files\... directory.  It isn't needed (since you could simply place the executables in the /bin/ directory).  Does that sound right?
Close except you should chage "linux" to "zaurus" - only zaurus uses /home/zaurus/Applications that I've seen, and then only for configuration/save files rather than binary files - the binary fiels are usually in /home/Qtopia/bin on the Z.

Don't take the file structure of the Z to be anything like a standard of linux. I've been using linux since 1995 and the zaurus structure still confuse me - they have a whole lot of symlinks chained together to get around the fact that most of the / directories are read-only

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Linux Directory Structure
« Reply #7 on: November 26, 2004, 11:11:20 am »
Quote
the binary fiels are usually in /home/Qtopia/bin

I reckon you mean /home/QtPalmtop/bin/.

This address (/home/QtPalmtop/) is symlinked to its correct location - /opt/QtPalmtop/, which makes more sense when looking at a standard Linux filesystem heirachy; the reason why it's in /home, is that only /home is writable and you want to be able to install things.

Quote
only zaurus uses /home/zaurus/Applications that I've seen, and then only for configuration/save files rather than binary files

This is my understanding too. Under Linux, configuration files are normally saved in subdirectories of the home directory.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Linux Directory Structure
« Reply #8 on: November 26, 2004, 03:58:07 pm »
The link I was given above shed some nice light on the simlink confusion in the Zaurus Linux directory setup.  You have a potential of 4 kinds of media on the Zaurus:
  • Read-Only Internal Memory or ROM Disk (/)
  • Read-Write Internal Memory or RAM Disk (/home/)
  • CF Card (/mnt/cf/)
  • SD/MMC Card (/mnt/card)
It's the interaction between the ROM Disk and RAM Disk that expalins why there are so many simlinks and duplicate diretories.  The root system directories are on the ROM Disk, but some of the files in them need to be changed by the system from time to time, so instead most of the root level system directories are nothing more than simlinks to equivalent direcories in the RAM Disk (inside the /home/ directory structure).

That's the first level of simlinks.

The 2nd level of simlinks is based on trying to have as many of the system binaries in the ROM as possible.  Most of the system binaries in the /home/ system directories are simlinks back to yet other directories off of the root.  When a system file is overwritten, the simlinks in the /home/ system directories get overwritten with actual new binaries and files.

So, in short, ROM simlinks to RAM which simlinks back to ROM.  The setup makes sense considering that this is an embedded Linux setup.  I can imagine that other Embedded Linux setups are similar.
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Linux Directory Structure
« Reply #9 on: November 27, 2004, 06:27:49 am »
Quote
I can imagine that other Embedded Linux setups are similar.

Some other Zaurus ROMs are completely normal though:

OZ, pdaXrom, etc. (as they have writable flashROMs) do away with both levels of symlink spaghetti and write files to their normal locations.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Linux Directory Structure
« Reply #10 on: November 27, 2004, 07:47:24 am »
Cool!
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

wmadan

  • Full Member
  • ***
  • Posts: 164
    • View Profile
    • http://
Linux Directory Structure
« Reply #11 on: November 29, 2004, 04:01:26 pm »
This is a fantastic example of a very helpful thread that I so often find here on the ZUG. I have learned a lot by following this.

Thanks!

Bill

Dez

  • Newbie
  • *
  • Posts: 4
    • View Profile
Linux Directory Structure
« Reply #12 on: December 17, 2004, 06:17:43 pm »
Does the SL-C3000 standard ROM follow the same symlink structure? It seems like with the HD and RAM for dynamic use only, it could look more like a "traditional" desktop Linux installation...

t,munari

  • Newbie
  • *
  • Posts: 2
    • View Profile
Linux Directory Structure
« Reply #13 on: February 23, 2005, 09:58:06 am »
Well... no,
cause the 3000 HD is divided in 3 partitions:
1st, mounted read only, it is used as a fake ROM,
2nd is rw and is equivalent to RAM,
and the 3rd is FAT32 to permit a "windows compatible" usb-slave mode.

It's a few weeks I've got a c-3000, I am really impressed by the hardware, but on the software part it's really lacking (but it's better than the other way round! =-)
Tomaso