[Casper] Delete com.adobe.mediabrowser.plist
Thomas Larkin
tlarki at kckps.org
Mon Jan 5 10:06:23 PST 2009
I have a search and destroy policy that searches out files by type or by name and deletes them. You don't need a script as it is a one liner command. Keeping it simple is the way to go in my humble opinion. If you want to get specific you can script it out and make it more robust.
Here are some examples:
/usr/bin/find /Users/* -name "full_filename.extension" -print -delete
That will search the /Users folder and delete all files to test it out just use the -print option first and leave out the delete option. Then once you confirmed it works add back in the delete. Working for a public school system I get to search and destroy some creative user created content that gets passed around from time to time.
If you are looking to delete a certain file type across the board you can add to the find command with regex and since home folder synchronizing is not perfect it syncs things that are not suppose to be there, and then I have to play janitor on the file servers. An example of that is:
/usr/sbin/find -x -E /path/to/share -regex '.*\.(m[4po][34agpv]|mpeg|aac|asf|wmv)' -print -delete
That deletes pretty much any file with those extensions in the file name, MP3, MP4, AAC, mpeg, so on and so forth. So that should give you something to work with and with the find command set the path to a narrow scope, otherwise it will just search the root of the drive and that can take forever to run
Hope that helps
___________________________
Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351
>>> Martin van Diemen <martin-van-diemen at g-star.com> 01/05/09 12:35 AM >>>
The version that has been installed is 6.01
Kind Regards,
Martin van Diemen
t +31(0) 205677744
__________________
G-Star International B.V.
www.g-star.com
________________________________
From: Ryan Harter <rharter at uwsp.edu>
Date: Fri, 2 Jan 2009 21:27:43 +0100
To: Martin van Diemen <martin-van-diemen at g-star.com>
Cc: Miles Leacy <miles.leacy at themacadmin.com>, <casper at list.jamfsoftware.com>
Conversation: [Casper] Delete com.adobe.mediabrowser.plist
Subject: Re: [Casper] Delete com.adobe.mediabrowser.plist
What version of Casper are you using? There was a bug in 6.0 that caused $3 to not be set, Casper 6.01 fixed this.
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu <mailto:Ryan.Harter at uwsp.edu><mailto:Ryan.Harter at uwsp.edu>
On Jan 2, 2009, at 4:50 AM, Martin van Diemen wrote:
Hi Miles,
Thanks for your reply. I've tried to make use of the $3 variable but the strange thing is that it's empty. We're making use of Active Directory. Could this have something to do with it?
Best wishes for 2009 to you all!
Kind Regards,
Martin van Diemen
t +31(0) 205677744
__________________
G-Star International B.V.
www.g-star.com <http://www.g-star.com><http://www.g-star.com>
________________________________
From: Miles Leacy <miles.leacy at themacadmin.com>
Date: Wed, 31 Dec 2008 14:57:34 +0100
To: Martin van Diemen <martin-van-diemen at g-star.com>
Cc: <casper at list.jamfsoftware.com>
Conversation: [Casper] Delete com.adobe.mediabrowser.plist
Subject: Re: [Casper] Delete com.adobe.mediabrowser.plist
username is $3
$1 is the mount point of the target drive
$2 is the computer name
$4 through $11 are configurable.
----------
Miles A. Leacy IV
? Certified System Administrator 10.4
? Certified Technical Coordinator 10.5
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com <http://www.themacadmin.com><http://www.themacadmin.com><http://www.themacadmin.com><http://www.themacadmin.com>
On Wed, Dec 31, 2008 at 4:58 AM, Martin van Diemen <martin-van-diemen at g-star.com> wrote:
Hi,
I want to delete the com.adobe.mediabrowser.plist (~/Library/Preferences/) for the user that's currently logging in. I tried to do this with a policy:
Search for file by path: ~/Library/Preferences/com.adobe.mediabrowser.plist and Delete if found.
This doesn't work because it can't find the file (cause it's using the casper account?).
Is this possible with a variable e.g. /Users/$1/Library/Preferences/com.adobe.mediabrowser.plist? $1 doesn't work.
If I use a script which variable tells me the login name of the user?
Thanks in advance.
Kind Regards,
Martin van Diemen
t +31(0) 205677744
__________________
G-Star International B.V.
www.g-star.com <http://www.g-star.com><http://www.g-star.com><http://www.g-star.com><http://www.g-star.com>
_______________________________________________
Casper mailing list
Casper at list.jamfsoftware.com
http://list.jamfsoftware.com/mailman/listinfo/casper
_______________________________________________
Casper mailing list
Casper at list.jamfsoftware.com
http://list.jamfsoftware.com/mailman/listinfo/casper
_______________________________________________
Casper mailing list
Casper at list.jamfsoftware.com
http://list.jamfsoftware.com/mailman/listinfo/casper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090105/193101b4/attachment.html
More information about the Casper
mailing list