LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-18-2012, 03:16 PM   #1
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
Linux Directory Structure


Hi to all ;

I want to clear few things about LINUX Directory Structure ..
Already i googled well and analyzed lot of links.
Little , little different were there.

I have only few topics to understand

>> /bin, vs /usr/bin ( User Binaries ) >>

/bin : example comands
/usr/bin : example commands


>> /usr vs /usr/local >>

I need some info about this.

Note:-
PHP Code:
As much as possible i googled i have few doubts So that i am asking above mentioned Questions.. 

Last edited by thiyagusham; 11-18-2012 at 03:19 PM.
 
Old 11-18-2012, 03:32 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the /usr location is historically for "higher level" applications, things that aren't require for the core guts of the system. /usr was always a separate, and MUCH larger filesystem which was loaded as part of the boot process, so binaries required as part of the bot couldn't be in there. Things are evolving somewhat in Linux land though, and some distros, like fedora, are totally scrapping /usr/bin and equivalent locations, promoting a simpler layout overall.
 
Old 11-18-2012, 03:37 PM   #3
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
All is documented here
http://refspecs.linuxfoundation.org/FHS_2.3/

This is the official specification and goes in details to answer all questions you can possibly have. As for /usr/local, it is similar to /opt, but with a "standard" prefix structure. Aka, install applications that are not managed by your package manager there if they follow standard directory structure. For example, if you want to install 'tree', you should install it in /usr/local, as doing it in /usr will potentially conflict with files managed by your package manager like rpm/yum.

Last edited by Elv13; 11-18-2012 at 03:38 PM.
 
Old 11-19-2012, 04:02 AM   #4
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
@ Hi Elv;

I red it but i need tmp file details

http://refspecs.linuxfoundation.org/...3/fhs-2.3.html
This link did n't answer my question...

>> tmp vs /var/tmp >>
Quote:
Programs can write their temporary files here.
A temporary file system which hold temporary files which are cleared at system reboot.
There is also a /var/tmp directory which holds temporary files too.
The only difference between the two is that /var/tmp directory holds files that
are protected at system reboot. In other words, /var/tmp files are not flushed upon a reboot.
What i understood above mentioned ,
here is my confusion

Quote:
If temp files( contents) are deleted from /tmp / while system reboot ,
Same contents will be placed to /var/tmp

Last edited by thiyagusham; 11-19-2012 at 04:04 AM.
 
Old 11-19-2012, 05:16 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by thiyagusham View Post
This link did n't answer my question...
Then you didn't read too well, see http://www.pathname.com/fhs/pub/fhs-...RESERVEDBETWEE


Quote:
Originally Posted by thiyagusham View Post
The only difference between the two is that /var/tmp directory holds files that are protected at system reboot. In other words, /var/tmp files are not flushed upon a reboot.
No. There is a difference between not deleting files on reboot and "protecting files". Files in temp may be deleted on reboot due to 0) the system using shared memory ('man mount': see "tmpfs") for the /tmp mount point or due to 1) running 'tmpwatch' or equivalent. Files in /var/tmp are not "protected" in any way and may be affected by 'tmpwatch' as well.


Quote:
Originally Posted by thiyagusham View Post
If temp files( contents) are deleted from /tmp / while system reboot , Same contents will be placed to /var/tmp
No. There is no automation that "places files in /var/tmp" other than what you code yourself. It would be best to not think of /var/tmp as storage but use /var/cache/%{application_name} or /var/lib/%{application_name} instead.


*Also please use VBB quote tags to quote what others said and not your own current reply.
 
1 members found this post helpful.
  


Reply



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
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 09:18 AM
Home Jail Folder Structure like Gobolinux Directory Structure luispt Linux - General 3 07-26-2008 06:46 PM
Linux Directory Structure Swakoo Linux - Newbie 2 07-19-2005 09:23 AM
Linux Directory Structure Boffy Linux - General 9 11-01-2004 01:50 PM
Linux Directory Structure cmfarley19 Linux - General 1 01-03-2003 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:02 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
Open Source Consulting | Domain Registration