Highly recommended: tldr-pages/tldr (website)
collection of community-maintained help pages for command-line tools, that aims to be a simpler, more approachable complement to traditional man pages.
-
Fix
zsh
'scompinit
error when initializing a new shellzsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]?
# Run the following command to fix the error above compaudit | xargs chmod g-w
-
Merge PDFs
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf *.pdf
# Requires 'python' binary # # Alternative # Merge multiple pdfs in current directory with prefix foo, e.g. # foo1.pdf foo2.pdf and foo3.pdf and create new PDF called merged.pdf \ls -larth foo*.pdf | xargs "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o merged.pdf {}
# Requires 'python' binary # # Alternative # Merge all pdfs in current directory into merged.pdf "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o merged.pdf *.pdf
-
View and edit .plist files
# Print file in human-readable format plutil -p foo.plist
# Print file as XML /usr/libexec/PlistBuddy -x -c "Print" foo.plist
-
View list of bypassed invalid SSL certificate warnings in Safari
plutil -p ~/Library/Containers/com.apple.Safari/Data/Library/Safari/BypassedInvalidCertificateWarning.plist
-
Exact string matching in search
Quote string, as in Google search bar, e.g.
"my sentence in preview"