• 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 delete extraneous plist files via AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to delete extraneous plist files via AppleScript


  • Subject: Re: How to delete extraneous plist files via AppleScript
  • From: Axel Luttgens <email@hidden>
  • Date: Thu, 13 Jan 2011 10:49:34 +0100

Le 13 janv. 2011 à 04:06, Christopher Stone a écrit :

> [...]
> What is the safest way to pass the find results to 'rm' in a one-liner?

Hello Christopher,

I guess the xargs(1) command could be of some help.

On the other hand, the find(1) command itself should be self-sufficient in this precise case; for example:

	find ~/Library/Preferences -depth 1 -name 'widget-com.apple.widget.weather.plist*' ! -name '*.plist' -exec rm '{}' ';'

Probably a good idea to test beforehand with ls(1) instead of rm(1)... ;-)

As a side note, this may be adjusted so as to simulate Finder's delete command:

	find ~/Library/Preferences -depth 1 -name 'widget-com.apple.widget.weather.plist*' ! -name '*.plist' -exec mv '{}' ~/.Trash ';'

HTH,
Axel

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to delete extraneous plist files via AppleScript
      • From: Christopher Stone <email@hidden>
References: 
 >How to delete extraneous plist files via AppleScript (From: Barry Fass-Holmes <email@hidden>)
 >Re: How to delete extraneous plist files via AppleScript (From: Axel Luttgens <email@hidden>)
 >Re: How to delete extraneous plist files via AppleScript (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Variable names
  • Next by Date: Re: Variable names
  • Previous by thread: Re: How to delete extraneous plist files via AppleScript
  • Next by thread: Re: How to delete extraneous plist files via AppleScript
  • Index(es):
    • Date
    • Thread