Last active
March 27, 2020 20:36
-
-
Save ntrogers/4a5dcefdb8a26342697e8ae67c450bf1 to your computer and use it in GitHub Desktop.
[macOS - Useful Commands] #macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# kickstart ARD | |
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -allowAccessFor -allUsers -privs -all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# browse for DNS-SD discoverable services (all types) | |
dns-sd -B _services._dns-sd._udp local. | |
# browse for all present services of type "IPP" | |
dns-sd -B _ipp._tcp local. | |
#lookup specific info about the printer named "Officejet 6600 @ mbp" | |
dns-sd -L "Officejet 6600 @ mbp" _ipp._tcp local. | |
# look up the IPv4 and IPv6 addresses for a given hostname | |
dns-sd -Gv4v6 mbp2-2.local | |
# see /etc/services for available services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get numeric chmod permissions for file | |
stat -f %A /path/to/file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mount network drive | |
osascript -e 'mount volume "smb://username:password@server/SMCSD Server"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# View Package Contents | |
pkgutil –-expand thePackage.pkg /destination | |
pkgutil –-expand-full thePackage.pkg /destination | |
# Get application bundle identifier | |
defaults read /Applications/Safari.app/Contents/Info.plist CFBundleIdentifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable print sharing | |
cupsctl --no-share-printers | |
# Location of generic printer driver | |
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd | |
# List all print drivers installed on a system | |
lpinfo -m -h 127.0.0.1:631 | |
# Reset the printing system | |
lpstat -p | cut -d' ' -f2 | xargs -I{} lpadmin -x {} | |
# Show available printer options | |
lpoptions -p <printername> -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment