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

safe to remove file


© December 2004 Tony Lawrence

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
written.

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

fuser /tmp/387b487c.805

or

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
are:

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
period.

-- 
Tony Lawrence (tony@aplawrence.com)
SCO articles, help, book reviews, tests, 
job listings and more : https://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?


Inexpensive and informative Apple related e-books:

El Capitan: A Take Control Crash Course

Take Control of OS X Server

Are Your Bits Flipped?

Take Control of Preview

Photos for Mac: A Take Control Crash Course




More Articles by © Tony Lawrence




Printer Friendly Version

Have you tried Searching this site?

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


Printer Friendly Version





Computer Science is embarrassed by the computer. (Alan Perlis)




Linux posts

Troubleshooting posts


This post tagged:

Disks/Filesystems

Kernel

Shell

Troubleshooting



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com