Features Mountain Lion. New Terminal Commands

In addition to an impressive list of more than 200 changes and innovations in the Mountain Lion you can find a number of new UNIX-commands. Of course, most of them are quite specific and are, shall we say, for very advanced users, but some teams may be useful even ordinary users who are not scared of the command line and the word terminal.

Administrator commands

Sharing

This utility can create, modify, and delete shared resources to AFP, FTP and SMB. Here’s how to use it, for example, share a specific folder on your Mac for all of these protocols:

Sudo sharing – a /Users/Deavy/temp-folder (directory name can be anything)

To disable guest access to the shared folder you want to slightly modify the previous command:

Sudo sharing – e /Users/Deavy/temp-folder – g 000

Disable the “ball” is fully as easy as it created:

Sudo sharing – r /Users/Deavy/temp-folder

In addition, sharing allows the individual names and access rights for each protocol, and indicate specific details. The only disadvantage may lie in the fact that this team has to always run as root, but for the majority of users and applications, it will not be so critical.

Serverinfo

Usefulness of this command is to write shell-scripts, and allows you to determine which version of the system it is run (normal or server), and what specific server features include:

If serverinfo – q –hardware; then echo Running on server hardware; fi

Unfortunately, this team is still no Man ‘with its detailed description, but running serverinfo – h will display a list of available options, and it may already be enough.

Common Commands

Caffeinate

Team caffeinate prohibits your Mac’u go to sleep for a certain period of time (eg one hour):

Caffeinate – u – t 3600

Or let run a team as much as you want, without worrying that the built-in function to automatically switch to sleep (which is particularly “aggressive” behaves in a Mountain Lion) will terminate its execution:

Caffeinate – s любая-команда-которая-выполняется-довольно-долго – аргументы

Fdesetup

Full disk encryption with the utility FileVault – it’s one of those things that you can turn on and once safely forget about it, because it just works, as Steve Jobs was fond of saying. So why not come UNIX-command that supports the entire process? At the moment you can think of multiple use of this command:

    After turning on FileVault, the user has once logged in (login) to activate your account. Unfortunately, before the Mountain Lion was no simple way to know which of the users on a particular computer has not done so. Unless uninformative message in the corresponding panel in System Preferences. The command sudo fdesetup list to display the list of activated accounts. A sudo fdesetup add – usertoadd имя-пользователя will enable the specified user account. In a network environment (for example, a small company or a classroom), the administrator will be able to force the FileVault on all computers with a combination of ssh and fdesetup, including integration with Open Directory and Keychains, if necessary.

However, it should be borne in mind that this team now supports only the main hard drive, so to encrypt any connected external drive you want to use hdiutil.

Pgrep and pkill

Most likely, many power users in the past, so use one of these tools through MacPorts or Homebrew, since it is far easier to use the pgrep, than to write some tricky ps опции|grep то-что-мы-ищем (which, moreover, he usually comes back grep ). In OS X 10.8 are available “out of the box.”

For example, if you want to know how much you have started the process of Chrome, just the empty following command:

Pgrep Chrome | wc – l

No less useful is the pkill. If you want to complete all the processes of Chrome for a particular user is not zastragivaya other accounts, run sudo pkill – U имя-пользователя Chrome. For more specific problems (especially with complex regular expressions), which require confirmation before each “murder” of the process, you can use-I.

Tccutil

Use this command to control the special database, which stores the user’s discretion with respect to applications requesting access to personal data. However, at the moment it can only remove the solutions for a specific program or service ( tccutil reset AddressBook ). On the one hand, it’s not much, on the other – much easier to execute this command remotely, you go to each computer on the network, and poking around in System tinctures.

Other articles from the “Features Mountain Lion» available at the following links:

    Notification Center Documents in the Cloud Power Nap Safari 6.0 Mail.app Other applications Everything that does not fall into the other parts
Incoming search terms: mountain lion terminal commands , mountain lion create user terminal , mountain lion delete mail queue in terminal , mountian lion commands , os x mountain lion terminal commands , terminal commands mac os x mountain lion ,
This entry was posted in Apple Store , How-To`s , News and tagged , , . Bookmark the permalink .

Leave a Reply