• 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: How to empty the Trash programmatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to empty the Trash programmatically?


  • Subject: Re: How to empty the Trash programmatically?
  • From: "Paul Sanders" <email@hidden>
  • Date: Fri, 16 Apr 2010 18:43:46 +0100

> But emptying the trash will delete files on *other mounted volumes* as well, not just the disk being examined.

rm -rf ~/.Trash/*

For volumes other than the startup volume it is a little more complicated:

rm -rf /Volumes/volume_name/.Trashes/uid/*

The Finder seems to notice when you do this and keeps in sync.

Looking in these folders will also allow you to give the user some idea of what he is about to permanently delete.

Paul Sanders.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to empty the Trash programmatically?
      • From: Jens Alfke <email@hidden>
    • Re: How to empty the Trash programmatically?
      • From: Raffael Cavallaro <email@hidden>
References: 
 >How to empty the Trash programmatically? (From: Oleg Krupnov <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Jens Alfke <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Oleg Krupnov <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Dave Keck <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Oleg Krupnov <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Graham Cox <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Jayson Adams <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Raffael Cavallaro <email@hidden>)

  • Prev by Date: Re: How to find all clipping siblings for a view?
  • Next by Date: Re: How to find all clipping siblings for a view?
  • Previous by thread: Re: How to empty the Trash programmatically?
  • Next by thread: Re: How to empty the Trash programmatically?
  • Index(es):
    • Date
    • Thread