LinHES Forums
http://forum.linhes.org/

how does "delete slowly" function behind the scene
http://forum.linhes.org/viewtopic.php?f=5&t=16054
Page 1 of 1

Author:  neutron68 [ Mon Aug 06, 2007 8:36 am ]
Post subject:  how does "delete slowly" function behind the scene

I've got "delete files slowly" enabled in my KM box.

How is the slow delete being accomplished? Is it a command line switch that is part of the "rm" command or is this something that Mythtv is doing/managing on it's own? What are the inner workings of the slow delete process?

I wonder if a slow delete can be done from a command line. Such as:
Code:
# rm /myth/video/file.mpg" -slow

Author:  nigelpearson [ Mon Aug 06, 2007 5:14 pm ]
Post subject: 

MythTV has code to do it. There is no magical 'rm' option.

Author:  tzoom84 [ Mon Aug 13, 2007 12:56 pm ]
Post subject: 

Doing a quick search on google I found this snippet (not sure about the validity):

Quote:
...Delete the files in Myth, which uses a "delete slowly" function
> to avoid locking up the machine for the 30-60 seconds that this would
> otherwise require. Myth appears to open the file, unlink it, and then
> sit in a loop doing small ftruncate's until nothing is left.


Source: Link

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/