LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Directory Structure (https://www.linuxquestions.org/questions/linux-newbie-8/linux-directory-structure-4175437711/)

thiyagusham 11-18-2012 03:16 PM

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.. 


acid_kewpie 11-18-2012 03:32 PM

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.

Elv13 11-18-2012 03:37 PM

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.

thiyagusham 11-19-2012 04:02 AM

@ 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

unSpawn 11-19-2012 05:16 AM

Quote:

Originally Posted by thiyagusham (Post 4832435)
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 (Post 4832435)
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 (Post 4832435)
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.


All times are GMT -5. The time now is 01:18 AM.