Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.