May 01, '03 09:56:00AM • Contributed by: chtito
Have you ever wondered about an easy way to know what is in a .pkg file without decompressing it? One solution was to use Pacifist, but it has gone shareware now. Besides, there is an easier solution with the Terminal. Drag your .pkg file on the Terminal icon in the dock while pressing the command and option keys. In the newly opened window type:
% cd Contents/Resources % ls
One of the files should have a name ending with .pax.gz. Assume it is called archive.pax.gz, issue the command
% gzip -cd archive.pax.gz | pax
Voilà! You have the contents of the archive displaying in your window. Simple but good to know. A similar means of finding out what's inside a .tgz, .tar.gz or .tar file is to use one of these commands:
Obviously, choose the command based on the extension (the t flag tells tar to just list the archive's contents). Hope this helps!
% tar tvzf file.tgz % tar tvzf file.tar.gz % tar tvf file.tar