Show Package Contents

How to get file to show it's content when contextual menu doesn't show "Show Package Contents" option available?

iMac G5 20"/2GB RAM; MBP/2GB RAM, MB/2GB RAM, Mac OS X (10.5), iPod 3G, iPod Touch 16 GB

Posted on Nov 6, 2007 5:24 PM

Reply
8 replies

Nov 6, 2007 8:20 PM in response to Stefanos Folias

Actually, that may not work. In Leopard, some ".pkg" files aren't "packages" at all, but are rather "xar archives ("xar" apparently stands for "eXtensible ARchiver"). Ctrl-clicking these won't offer the option of showing the package contents, since they are plain files. However, there is indeed a command line tool included with "Leopard" to expand such files, at ' /usr/bin/xar'.

Check the ' man' page for details, but the basic syntax to list the contents of an archive seems to be along the lines of:<pre>
xar -tf /path/to/archive.pkg
</pre>

To expand an archive, ' cd' into somewhere suitable with enough space to accomodate the contents, and try eg:<pre>
xar -xf /path/to/archive.pkg
</pre>

With both examples, substitute the actual path to the archive where it says "/path/to/archive.pkg".

This may not apply to all "xar" archives - I'm still in the process of familiarizing myself with this tool.

Nov 6, 2007 6:58 PM in response to Andrew Miller

okay

well you don't need much to look at what files are in it.


in Terminal.app or in X11

if you know the cd (change directory) command

you can just cd into the directory.

.pkg is a directory and there is a contents directory inside


so for example, if you're in the directory where the .pkg file sits, then typing

cd NAME.pkg/Contents

then typing +ls -aF+ will show you ALL of its contents


that being said, i believe you usually can "show package contents" on .pkg files

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.

Show Package Contents

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