Can't read plists

I have a MacBook Pro 11,3 running a fresh install of Yosemite with all updates. I cannot read plists on it.


Example:


ballys:~ joliver.sa$ ls -l /Applications/Adobe\ Reader.app/Contents/Info.plist

-rw-rw-r-- 1 root admin 10533 Dec 2 19:57 /Applications/Adobe Reader.app/Contents/Info.plist

ballys:~ joliver.sa$ defaults read /Applications/Adobe\ Reader.app/Contents/Info.plist

2015-01-28 09:43:20.542 defaults[62246:2368905]

Domain /Applications/Adobe Reader.app/Contents/Info.plist does not exist

ballys:~ joliver.sa$ defaults read /Applications/Adobe\ Reader.app/Contents/Info

2015-01-28 09:43:23.310 defaults[62247:2368920]

Domain /Applications/Adobe Reader.app/Contents/Info does not exist

ballys:~ joliver.sa$ head -5 /Applications/Adobe\ Reader.app/Contents/Info.plist

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>AppType</key>


This is just an example. I have the same issue with many others, including Safari. The plist is there, it can be read, it isn't corrupt, but 'defaults read' cannot read it.


What's up?

OS X Yosemite (10.10)

Posted on Jan 28, 2015 9:47 AM

Reply
11 replies

Jan 28, 2015 10:33 AM in response to jnojr

'defaults' does not read all plists. The defaults system handles preferences that are part of an applications 'defaults domain'.

"/Applications/Adobe\ Reader.app/Contents/Info.plist" is not a 'settings plist' it is info for the app version etc.


In Terminal read the manual via…

man defaults

or…

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/defaults.1.html


You need to look at other tools for editing/ reading or converting etc…

plutil

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/plutil.1.html#//apple_ref/doc/man/1…


PlistBuddy

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man8/PlistBuddy.8.html


plist

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man5/plist.5.html#//apple_ref/doc/man/5/…


NOTE: Some plists will be binary - you can convert them via plutil otherwise you can view & edit xml plists via cat or nano etc.

Jan 28, 2015 12:52 PM in response to jnojr

Actually you are right, I'm on 10.9 so I didn't check at the time but it prints the values inside the plist.

Maybe it's busted in 10.10, are the other Macs different OS X versions?

Have you checked the installed manual is the the same as the linked version?


Within the filepath section of that manual is this little gem…

WARNING: The defaults command will be changed in an upcoming major release to only operate on
preferences domains. General plist manipulation utilities will be folded into a different
command-line program.



Try to look for other plist editing command line tools…

apropos plist

Jan 28, 2015 1:47 PM in response to jnojr

Using the following syntax variations, I can read the Adobe Reader plist on Mavericks, and Yosemite 10.10.2:


defaults read /Applications/Adobe\ Reader.app/Contents/Info.plist


defaults read -app /Applications/Adobe\ Reader.app


defaults read com.adobe.Reader


plutil -p /Applications/Adobe\ Reader.app/Contents/Info.plist | more


plutil -p /Applications/Adobe\ Reader.app/Contents/Info.plist | egrep --color=auto "CFBundleShortVersionString" | egrep -o "([[:digit:].]+)"


Result: 11.0.10

Feb 4, 2015 8:45 AM in response to jnojr

jnojr wrote:


ballys:~ joliver.sa$ defaults read /Applications/Adobe\ Reader.app/Contents/Info

2015-01-28 09:43:23.310 defaults[62247:2368920]

Domain /Applications/Adobe Reader.app/Contents/Info does not exist

Perhaps it is a permissions issue, try the following.


sudo defaults read /Applications/Adobe\ Reader.app/Contents/Info


You could also try the following however if the plist is in binary rather than XML format it will at best display gibberish.


cat /Applications/Adobe\ Reader.app/Contents/Info.plist


(cat needs the exact filename including any file extension, unlike defaults.)

Feb 4, 2015 11:12 AM in response to jnojr

jnojr wrote:


ballys:~ joliver.sa$ ls -l /Applications/Adobe\ Reader.app/Contents/Info.plist

-rw-rw-r-- 1 root admin 10533 Dec 2 19:57 /Applications/Adobe Reader.app/Contents/Info.plist


Everyone has read permission, no extended ACLs. Already thought of that :-)

The permissions of the parent folders could also be relevant as you need to be able to access the Contents folder for example. This means you need both r for read and x to enter those folders. However I am inclined to believe you have sufficient permission in order to be able to do an ls -l of the file.


If all your trying to do is look at it, using sudo might be worth while.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't read plists

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.