Re: How to delete extraneous plist files via AppleScript
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