Last active
January 21, 2017 08:36
-
-
Save kobanyan/ab01d9145b1aff10f4f84949ad9d8438 to your computer and use it in GitHub Desktop.
Export all plist as xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dest="${1:-"$HOME/plist-xmls"}/`date "+%Y%m%d%H%M%S"`" | |
if [ -e "$dest" ]; then | |
echo "$dest exists already." | |
exit 1 | |
fi | |
mkdir -p "$dest" | |
for file in `find "$HOME/Library/Preferences/" -type f -name *.plist -depth 1`; do | |
filename=${file##*/} | |
domain=${filename%.*} | |
defaults export "$domain" - > "$dest/${filename}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment