InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Mac Command Line tutorials

  • Bulk convert jpeg files to png using sips on mac
  • Custom terminal tab title and ssh on mac
  • How to convert text to speech on Mac using command line utility say
  • How to join multiple pdf files on Mac
  • How to use qpdf to add/remove password from pdf on mac
  • Install redis on Mac
  • Mac - find which process is listening on a port
  • Mac - hide and unhide a file or directory
  • Mac - open a terminal from a folder
  • Mac - print java home on command line
  • Mac - search files on command line using mdfind
  • Mac command line convert svg to png
  • Mac command line utility open - some handy tips for better productivity
  • Mac terminal - how to close shell on exit
  • mac pkgutil - quick start guide
 
  • Home
  • > Tutorials
  • > Mac
  • > Mac Command Line

mac pkgutil – quick start guide

By admin on Sep 27, 2015

pkgutil can be used to query Mac OS X Installer packages on Mac. This can be useful to get information about various packages and files. Here are some quick use cases where pkgutil can be used:

List all packages

To list all installed packages on mac:

$ pkgutil --pkgs

List files of a package

To lists files of a package:

$ pkgutil --files com.apple.pkg.JavaEssentials

To list only directories of a package:

$ pkgutil --files com.apple.pkg.JavaEssentials --only-dirs

List package name for a file

To list which package a file belongs to (if any):

 
$ pkgutil --file-info /bin/bash
volume: /
path: /bin/bash

pkgid: com.apple.pkg.BaseSystemBinaries
pkg-version: 10.10.0.1.1.1425657145
install-time: 1442975500
uid: 0
gid: 0
mode: 555

pkgid: com.apple.pkg.update.security.10.9.5.13F1112.2015.006
pkg-version: 1.0.0.0.1.1306847324
install-time: 1442777342
uid: 0
gid: 0
mode: 555

Note that you cannot query packages others than Mac OS X Installer packages using pkgutil.

Suggested posts:

  1. Mac brew (homebrew) – quick start guide
  2. Composer – quick start guide on Linux and Mac
  3. bower – installation and quick start guide
  4. haxe openfl on mac – quick start guide for mobile development
  5. Docker quick start guide on Ubuntu
  6. Gulp quick start tutorial
  7. Ubuntu – dpkg and apt-get beginner tutorial
  8. Mongo – cli quick start guide
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Mac, Mac Command Line, Tutorials

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2023 InfoHeap.

Powered by WordPress