open or cd to the directory of a file path
# open directory of a file path # can be used together with the [esc-.] key sequence function odf() { /usr/bin/open "$(/usr/bin/dirname "$@")"; return 0; } # cd to the directory of a file path function cdf() { cd "$(/usr/bin/dirname "$@")"; return 0; } ls -l /Library/Desktop\ Pictures/Nature/Tranquil\ Surface.jpg ls -l /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ExecutableBinaryIcon.icns odf [esc-.] cdf [esc-.] odf /System/Library/SystemProfiler/SPFirewallReporter.spreporter/Contents/Resources/ cdf /System/Library/SystemProfiler/SPFirewallReporter.spreporter/Contents/Resources/English.lproj/Localizable.strings