LinuxQuestions.org
Visit Jeremy's Blog.
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 11-17-2005, 07:39 PM   #1
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Rep: Reputation: 38
General question about directory structure....


Been hesitantly messing around with this linux thing for a little while, and what still confuses me slightly is what all the directories in / are for. I've got (and i assume most distros have):

bin/ dev/ initrd/ lost+found/ opt/ root/ sys/ usr/
boot/ etc/ home/ lib/ mnt/ proc/ sbin/ tmp/ var/

I've worked out that mnt/ is where all the mountable devices go, root/ is root's home folder, essentially, lib/ is for libraries and home/ is where user's home directories are stored.

But i've no idea what's supposed to be in the others. For example, under windows i knew if i let all the defaults go, i'd find the working folder in c:/program files/.
But RPMs magically install into somewhere unspecified....

What's the bin/ dev/ initrd/ sys/ usr/ etc/ proc/ sbin/ tmp/ var/ and especially lost+found/ for?

Cheers!
 
Old 11-17-2005, 07:51 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
Try google
http://www.comptechdoc.org/os/linux/...ilestruct.html
 
Old 11-17-2005, 07:58 PM   #3
Riddick
Member
 
Registered: May 2004
Location: Rome, Italy
Distribution: slackware-current
Posts: 454

Rep: Reputation: 30
What distribution do you have?
I have never heard of lost+found. For real descriptions you
should see the Linux Standard.
bin/ - Binaries - like the mount command
dev/ - Where the Kernel makes links to devices
initrd/ - this is usually inside /etc but I imaine this is startup and shutdon scripts
sys/ - Kernel stuff - I have no idea about this one.
usr/ - Starts getting vague here
etc/ - most configuration files are here
proc/ - Kernel's interface with the Processor
sbin/ - more binaries, deamons are typically here
tmp/ - temporary files
var/ - Logs and things

In linux programs are compiled from source, and an RPM is basically
a standard way of gettin a precompiled source code to everyone
(saves time).
In any most program there will be configuration stuff going to /etc
some special libraries in /lib or /usr/lib
some usr-files in /home etc etc...

so when you are compiling a program and you do "make"
that compiles the program, and "make install" tends to be the part
when all the compiled bits get put in the right place.

Given than any program may want to use any other program's libraries, it is
quite clever to keep them together - so this way all the same
sorts of things are kept together,
but the programs are spilt up (as an end result).

Hope I was helpful
Riddick
 
Old 11-17-2005, 08:06 PM   #4
eerok
Member
 
Registered: Nov 2005
Location: Canada
Distribution: Mint, Debian
Posts: 168

Rep: Reputation: 32
Quote:
Originally posted by Riddick
I have never heard of lost+found.
You'll only see those with ext2.
 
Old 11-17-2005, 08:07 PM   #5
Riddick
Member
 
Registered: May 2004
Location: Rome, Italy
Distribution: slackware-current
Posts: 454

Rep: Reputation: 30
ahh right, thanks for that!
 
Old 11-19-2005, 05:38 PM   #6
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
lost+found is a directory in the top of a filesystem that's use to hold "lost" (and found) files that have become detached from the directory structure. fsck does this business. It's created with a fair sized directory by default (or should be) since if your filesystem is broken, the last thing you want to be doing is allocating data blocks when you're fixing things up.

The files (if they're like UNIX) are all named for the inode of the file, prefixed with a '#' character (so beware how you refer to them and don't just start a shell comment!). The idea is to examine the content of the found files and then rename them to their original name (assuming you can figure it out from that content). They've saved my life on a number of occasions.

Last edited by eddiebaby1023; 11-19-2005 at 05:39 PM.
 
Old 11-20-2005, 03:57 AM   #8
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Originally posted by eerok
You'll only see those with ext2.
I am sure I've seen these on FC using ext3.
 
  


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
directory structure question bmorency Linux - Newbie 1 10-27-2005 05:31 PM
Linux general structure woranl Linux - Newbie 4 05-26-2005 06:14 AM
"WARNING: Circular directory structure" error when deleting directory pistonbrew Linux - Software 5 02-03-2005 07:05 AM
/home directory structure question Dswissmiss Linux - General 2 09-29-2004 12:54 PM
directory structure alaios Linux From Scratch 4 04-20-2004 07:16 PM


All times are GMT -5. The time now is 01:10 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration