On Feb 26, 2007, at 12:31 PM, Sam DeVore wrote:

> On Feb 26, 2007, at 12:25 PM, Charles Yeomans wrote:
>
>>> Here's a sure way (warning to shell haters - involves shell and
>>> sudo...)
>>
>> I don't think this is necessarily more sure.  How does it handle a
>> change of directory contents during execution?
>
> also there are opinions about passing the password like that...  as
> well as this isn't really a cross platform method

That's why the call to /usr/bin/true.  The command takes less that 18  
ms, so the potential that a top-watcher would even see the first  
command is nearly nil.  And the third line resets the sudo key  
timeout so that others can't piggyback onto the sudo that was just run.

As for cross platform, the commands provided will work with Linux and  
OS X, for Windows you could use the DOS commands DEL and DELTREE to  
accomplish the same tasks - just remember to set the timeout so that  
the shell will let the command complete.

Tim
--
Tim Jones
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to