APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

safe to remove file

Any program that puts files in /tmp should rightfully expect
that they can be deleted.  Further, if it did happen to
still have them open, the data blocks would not be
deallocated until it closed the file, so  deletion
wouldn't affect it at all unless it was very stupidly

To find out what, if anything, is using the file, try 

fuser /tmp/387b487c.805


lsof /tmp/387b487c.805

If that spits anything, then it's in use. 

You can sometimes make use of 

ls -lut 387b487c.805

to see when the file was last used.  It might give you a
clue as to who or what created it.  The other things to do

file 387b487c.805

which might provide instant insight, and

(if "file" above says it's text or commands) 
more 387b487c.805

(if it's not text)
hd 387b487c.805 | more  

or even just
strings 387b487c.805

to see the contents.

As a general trick to see if a file is needed by anything
else, try changing its name:

mv 387b487c.805 THISWAS387b487c.805

If nothing barfs after a few days, you should be safe to
remove it- but again, anything in /tmp should be fair game

Tony Lawrence (tony@aplawrence.com)
SCO articles, help, book reviews, tests, 
job listings and more : http://www.ApLawrence.com

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> safe to remove file ––>Re: strange file?

Increase ad revenue 50-250% with Ezoic

More Articles by

Find me on Google+

© Tony Lawrence

Kerio Samepage

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Unlike info, pinfo does not display anything if it has nothing. I've been forever irritated by info coming up with its default page when it has nothing to tell me. (Tony Lawrence)

This post tagged: