SlackwareThis Forum is for the discussion of Slackware Linux.
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.
You could backup the created packages just to be safe to create your own repository so you dont have to rebuild them in case of a reformat or a package getting overwritten accidentally.
Be careful deleting everything from /tmp. Sometimes there are things in there you don't want to remove, especially on a completely default setup. Here is how I dealt with it, in a safe fashion:
Create /etc/rc.d/rc.local_shutdown
Code:
#! /bin/sh
# Clear /tmp directory of older files (>10 days since accessed)
find /tmp -type f -atime +10 -exec rm {} \;
echo rc.6: Deleting /tmp files not accessed in 10 days.;
save the file and run chmod +x on it
This will only delete files that haven't been accessed in 10 days.
If they are in use you won't be able to delete them.
No, it is not true. for example during a compilation (or any other complex processes) there can be work files stored in /tmp. Different phases of that process can read or write those files and you are allowed to delete them - and therefore fool your process.
In my case, I export OUTPUT to a repository in the /home directory to keep all the packages I build. I noticed that unless there at least one logged-in user, the /tmp directory is not used, so in /etc/rc.d/rc.local I entered the following
No, it is not true. for example during a compilation (or any other complex processes) there can be work files stored in /tmp. Different phases of that process can read or write those files and you are allowed to delete them - and therefore fool your process.
Unless the program closes the file handle the file will never be truly deleted.
Unless the program closes the file handle the file will never be truly deleted.
for example gcc is a wrapper and calls a few processes like cpp. Those processes will create files in /tmp (and of course they use the previously generated ones). Yes, you are right the processes will keep the files as long as they exist, but in the next step the removed file will not be available therefore the compiling process will be broken.
The parent process (gcc itself) does not open that file just uses its name and passes it to the child processes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.