0

I'm trying to edit my Safari bookmarks programmatically. When I try to open the file ~/Library/Safari/Bookmarks.plist, I get an pop-up with the error:

“Bookmarks.plist” is damaged and can’t be opened. You should move it to the Trash.

If I try to preview it by pressing space, it shows thousands of lines of this kind of nonsensical content:

Preview of the file

Despite of this my Safari bookmarks are working normally though.

I am using FileVault, but shouldn't all the files be unencrypted when the computer is open?

  • 1
    I wonder if it is a binary plist file? PLUTIL is a command line tool to "decode" such files and running that file through it might yield better results. Just spitballin' here... – Steve Chambers Jun 10 at 23:09
  • @Steve Chambers, Yes the ~/Library/Safari/Bookmarks.plist file is a binary file; however' it does not need to be converted if using the right tools. The OP has not presented any details of how he programmatically edited it. Hopefully he made a backup before editing it and should just restore from the backup. – user3439894 Jun 10 at 23:15
  • The file is not encrypted, it is just not plain text. You can most likely open the file with BBEdit, for example. However, editing the Bookmarks.plist file is probably not going to work the way that you want, so it would be useful to know what you are trying to accomplish before we go much further. – TJ Luoma Jun 11 at 0:17
  • @user3339894 I have not edited the file yet at all. It just was that way. – ruohola Jun 11 at 6:35
  • @TJLuoma This question is what I'm trying to accomplish: stackoverflow.com/questions/56517403/… – ruohola Jun 11 at 6:36
1

Mine bookmarks preview looks the same as yours; in finder or from terminal you do not have the rights to do something with. However, with Safari | Bookmarks | Edit Bookmarks you can do anything you need with it - deleting an item, renaming, modifying the address. If you need to export it, you can do it from File | Export Bookmarks... - and will be exported as .html (while you are in Edit page).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .