vohost.blogg.se

Shell script to edit mac network settings
Shell script to edit mac network settings




shell script to edit mac network settings
  1. #SHELL SCRIPT TO EDIT MAC NETWORK SETTINGS HOW TO#
  2. #SHELL SCRIPT TO EDIT MAC NETWORK SETTINGS MANUAL#

If you don’t then the name given in the - p flag will be the name.Īll of the standard PPD files on a Mac are kept in /Library/Printers/PPD/Contents/Resources/en.lprog/. If you use the description field that is the name that appears in Printer Setup Utility. Also, the name cannot contain any non-printable characters (ex.

shell script to edit mac network settings

Just remember if your name has spaces in it you’ll either need to escape the spaces or quote the name. The name of the printer is whatever you want the user to see, such as “color laser printer”. usr/sbin/lpadmin -p "name of printer" -E -v lpd://"printer IP or DNS"/"queue name" -P "path to PPD file" -D "description"

#SHELL SCRIPT TO EDIT MAC NETWORK SETTINGS HOW TO#

In this post I’m going to cover how to create a printer and how to delete one using Terminal and lpd. As usual you can type man lpadmin to get all the gory details. It’s the command line utility for CUPS, the underlying printing architecture of OS X. lpadmin is used mainly to set up network printers. Or you might want to add the ability to create printers to a login script or a script that runs after a machine is re-imaged. For example, you might want to create printers on remote machines that only have shell access. But occasionally you might have need to create printers at the command line. Using the Printer Setup Utility in OS X is a very easy and simple way to create printers on a Mac. So, to back up your Address Book and put it in nice “.abbu” file for easy restores just do this: Again, not hard to do but some users have problems doing things that go outside of clicking on a menu item. Otherwise you have to drag the backed up folder to the original spot. The beauty of having this file is when you want to restore your Address Book via the menu you can just point to this file. That’s just the AddressBook folder renamed and getting that extension.

#SHELL SCRIPT TO EDIT MAC NETWORK SETTINGS MANUAL#

But you may have noticed that when you do a manual backup via the Address Book application you get a file with the “.abbu” extension.

shell script to edit mac network settings

To backup your Address Book all you need to do it copy the /Users/”user name”/Library/Application Support/AddressBook folder in each users home directory. The big issue with backing up this way, as with any backup, is getting people to do it and do it regularly. This has saved many people massive heartache when they’ve had their machines go down/did an OS re-install or various other scary things (Yeah, I know, if you have MobileMe you don’t need to do this but most people don’t). Management, Scripts, shell scripts, System ::įor quite a while now you’ve been able to manually backup your entire Address Book. I can see this tool being used by lots of system administrators in scripts.Īpple also has a nice KB article explaining this feature here The tmutil utility has a bunch of other useful commands that allow you to enable or disable backups, start and stop backups, choose a new disk, etc. You can confirm that you’ve enabled local snapshots by opening System Preferences > Time Machine and looking for the line circled in the image. To disable them AND clear all the local snapshots: To enable these local snapshots you have use the new command-line tool for Time Machine named tmutil. So, if you make some changes to a document while you’re away those changes will still be added to your Time Machine backup. Now you can have those hourly snapshots created no matter where you are. This is a great service for laptop users. Once you re-connect the drive it will move them over to your drive and wipe them off the local disc. Basically, when you are away from your Time Machine disc and have this enabled Lion will create your hourly snapshots locally instead of on your backup drive. With the release of Lion Apple has added a new, somewhat hidden, ability to Time Machine.






Shell script to edit mac network settings