Created
August 1, 2012 08:18
-
-
Save kassi/3224919 to your computer and use it in GitHub Desktop.
Update URLs in Safari Bookmarks & History
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
# close Safari! | |
cd ~/Library/Safari | |
cp Bookmarks.plist History.plist ~ # make a backup!! | |
# convert to readable | |
plutil -convert xml1 Bookmarks.plist | |
plutil -convert xml1 History.plist | |
# change with regex | |
sed -e 's/our\.old\.url/my\.new\.url/' -i.orig Bookmarks.plist | |
sed -e 's/our\.old\.url/my\.new\.url/' -i.orig History.plist | |
# check | |
diff Bookmarks.plist.orig Bookmarks.plist | |
diff History.plist.orig History.plist | |
# if ok, convert back | |
plutil -convert binary1 Bookmarks.plist | |
plutil -convert binary1 History.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks it work!