Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
OK - So I was told that the /tmp directory was a place I can throw stuff that is just kind of like a Recycle Bin and that Linux will auto flush this directory at some point. My question is if I move something into /tmp as "root", how long will it remain in /tmp? Does it get flushed automatically by how long it remains in /tmp or does /tmp have a size limit and once exceeded, it flushes the files?
Also can you set parameters for /tmp like auto flush every 30 days or even every 1 day?
To amplify on that response. /tmp itself is just a directory (or sometimes a filesystem). As such it doesn't automatically delete anything.
On Linux as the above poster said by default many distros have the tmpwatch to do cleaning. On UNIX systems some people add cron jobs to do such cleaning or startup jobs. (Years ago on AT&T UNIX the default job actually blew away the directory on reboot then recreated it.) The idea is NOT to use it for permanent storage as most admins know it is fair game and will not hesitate to blow away files there if space becomes an issue. It's a good to periodically blow things away by such a cron job as at it teacher users not to store things there the hard way.
Note there also is a /var/tmp and on some older systems a /usr/tmp.
Be aware that /tmp is sometimes mounted as tmpfs, i.e. a filesystem backed by virtual memory instead of directly a disk partition.
This is very good for performance, as you'll have memory access time vs disk drive access time for the temporary data placed there.
The drawback are:
- everything is lost when the system shutdowns
- very big files living in /tmp can dramatically slow down the system because of pagination.
Another point: /var/tmp is a filesystem designed to store persistant data. Only the application that create files or directory there are allowed to remove them.
You should't remove files present there (or have a daemon that do it) without knowing what you are removing.