Linux can i delete tmp files




















Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Ask Question. Asked 8 years, 7 months ago. Active 3 years, 3 months ago. Viewed 76k times. Improve this question. TRiG 1, 1 1 gold badge 14 14 silver badges 33 33 bronze badges.

What does df -h say? Add a comment. Active Oldest Votes. Improve this answer. Community Bot 1. In general this is all excellent advice, esp the last paragraph. So it's still possible to delete files that processes have open? And this doesn't crash the program? Where does the file exist then?

Can the program still interact with this "opened but concurrently deleted" file? Is there some way of making it difficult or impossible for rm to remove the file? Something like a file lock perhaps? Files are datasets in the file system that are made accessible in a hierarchical namespace, via a path and a file name. A file can have multiple names hard links , and process can have an open handle for a file. If the file is not accessible, that is when it has no name and no open handle, it is deleted.

Preventing a delete is beyond my expertise and IMO beyond the scope of this question. Try looking for "mandatary locking". Absolutely DO NOT add -r to that - that will have the effect or removing files less then 10 days old where they exist in directories which were created more then 10 days ago.

Using the find command will recurse subdirectories — davidgo. Hwo could one add lsof to check the file os ont being used? So, as all mentioned above about the temporary files, there is no need to worry about the temporary files.

In most cases, the deleting of temporary files will be automatically done but you can do it yourself too. This directory stores temporary data. On a busy mail server, anywhere from GB could be appropriate. Web browsers periodically write data to the tmp directory during page views and downloads. Another way to clean up Linux is using a powertool called Deborphan. Deborphan can be used as a terminal command line tool or in combination with a GUI application called GtkOrphan.

While this doesn't necessarily help if we're talking about a no-reboots-EVER server here, one possibility might be running find. In which case atime isn't going to be remotely helpful. Rory Alsop Rory Alsop 2, 15 15 silver badges 27 27 bronze badges. APerson 2 2 silver badges 9 9 bronze badges. Quick question when you say "that will kill its socket" what do you mesn by 'socket'? Johan Johan 4, 1 1 gold badge 25 25 silver badges 32 32 bronze badges.

No I don't think the Debian derived distros like Ubuntu does it right now anyway. But it is quite easy to add this if you like it. Ubuntu Matty or whatever the current release is called does. But if you don't reboot your machine regularly, it won't happen.

Ok, did not check the current. I'm using the LTS track right now. Why would it make the system faster? What exactly would be faster? Calculations, disk access, networking, boot up? Show 1 more comment. Aleem11 A. Aleem11 95 1 1 bronze badge. This is a really bad idea. Yes, and you said the permissions should be when in fact they should be Sign up or log in Sign up using Google. Sign up using Facebook.

Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.



0コメント

  • 1000 / 1000