• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scripting secure empty trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting secure empty trash


  • Subject: Re: scripting secure empty trash
  • From: "Steven D. Majewski" <email@hidden>
  • Date: Thu, 13 Jul 2006 16:19:46 -0400

I know I'm not supposed to answer an applescript question with a shell answer,
but since Kai says it not directly scriptable, 'rm -P' might be a subsitute.


From 'man rm' :

-P Overwrite regular files before deleting them. Files are
overwritten three times, first with the byte pattern 0xff,
then 0x00, and then 0xff again, before they are deleted.


so something like:

	do shell script "rm -R -f -P  " & Posix path of (path to trash) & "*"

might do the trick --
although something inside me flintches at the act of appending
a wildcard onto the end of an 'rm' anything script. I would probably
want to check that 'Posix path of (path to trash)' wasn't somehow
and empty string. Maybe "rm -RfP ~/.Trash/* " would be safer + better.



-- Steve Majewski


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: scripting secure empty trash
      • From: Andrew Brosnan <email@hidden>
References: 
 >scripting secure empty trash (From: Andrew Brosnan <email@hidden>)
 >Re: scripting secure empty trash (From: Yvan KOENIG <email@hidden>)
 >Re: scripting secure empty trash (From: kai <email@hidden>)

  • Prev by Date: Re: Escape Character (was: no subject)
  • Next by Date: Re: scripting secure empty trash
  • Previous by thread: Re: scripting secure empty trash
  • Next by thread: Re: scripting secure empty trash
  • Index(es):
    • Date
    • Thread