how to delete plist file from ever users library/preference folder with policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-04-2012 11:25 AM
Hello,
I installed GarageBand Loops and they won't show up until the the plist file rebuilds itself. Is there a fast way to delete plist file from every users home folder?
The file name is com.apple.garageband.plist. It works ok for new users, but users with existing accounts do not see the loops.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-04-2012 11:34 AM
Login, Once Per Computer
#!/bin/sh
rm -R "~/Library/Preferences/com.apple.garageband.plist"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-04-2012 11:50 AM
#!/bin/bash
for dir in /Users/*; do
if [[ -e "${dir}/Library/Preferences/com.apple.garageband.plist" ]]; then
rm "${dir}/Library/Preferences/com.apple.garageband.plist"
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-04-2012 12:15 PM
Alternatively, you could just pull a working plist from a new user and push it out with FEU checked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-28-2014 05:51 AM
Hello all, having a similar issue. I am trying to remove the below file from the library for all users on the computer through a bash script but the wildcard does not seem to do anything. Testing the script locally by running it on mac os x terminal.
File to be deleted: com.apple.eap.bindings.XXXXXXX.plist
#!/bin/bash
for dir in /Users/*;
do
if [[ -e "${dir}/Library/Preferences/com.apple.eap.bindings.*" ]]; then
rm "${dir}/Library/Preferences/com.apple.eap.bindings.*"
fi
done
The script just doesn't delete the required file. I tried removing the quotes as well and still won't delete. What am I doing wrong here please?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-28-2014 07:31 AM
Test before implementing, but this worked for me--running as root:
#!/bin/bash
for user in /Users/*
do
for f in "$user"/Library/Preferences/com.apple.eap.bindings.*
do
if [ -e "$f" ];then
echo "Removing $f"
rm $f
else
echo "Files not found in $user"
fi
sleep 1
done
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-28-2014 03:10 PM
Why not just use:
rm -f /Users/*/Library/Preferences/com.apple.eap.bindings*
Bash will expand it as necessary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-16-2015 01:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 02-08-2016 05:30 PM
@mgrev @jacob_salmela I attempted running both of your bash scripts to no avail. The files I am targeting are Microsoft plist files within the CrashReporter folder of each user's home directory.
The issue is: I am not getting any error/syntax messages, yet the plist files remain.
@jacob_salmela's script returns that the "files not found", as the script dictates. @mgrev's script returns nothing, but removes nothing. The separate scripts are below.
#!/bin/sh
for dir in /Users/*
do
for f in "$dir"/Library/Application Support/CrashReporter/Microsoft*
do
if [ -e "$f" ];then
echo "Removing $f"
rm -f $file
else
echo "Files not found in $dir"
fi
sleep 1
done
done
#!/bin/sh
for dir in /Users/*
do
if [[ -e "${dir}/Library/Application Support/CrashReporter/Microsoft Word_"* ]]; then
rm "${dir}/Library/Application Support/CrashReporter/Microsoft Word_"*;
fi
done
I have tried multiple variations of both; moving wildcards and trying different flags. Any help would be appreciated.