Frequently used shell commands for updating Mac server services, and mac server shell commands
On the Mac server, you must enable remote logon. Enable: system preference settings-> share check remote Logon
Common Commands include:
Copy (copy the local file to the remote server) scp-r local path/file userName@192.168.xxx.xx:/tmp # userName for the remote server user name, followed by the server address, /tmp is a directory of the remote server. In some cases, you may encounter permission problems. You can copy it to/tmp first, log on to the remote service, and then run cp or mv. Enter the logon password of the current user on the remote server to log on. Log on to the remote server: ssh userName@192.168.xxx.xx # userName is the name of the remote server user, followed by the server address. Enter the logon password of the current user on the remote server to log on. Backup zip-r dirName.zip dirName # first, pack the backup files to be updated into a zip file and decompress unzip shell.zip # If the _ MACOSX directory is generated, please refer to the previous article. Address: [link text] (http://blog.csdn.net/showhilllee/article/details/47067115 "undo pressure Mac decompression command _ MACOSX Related Files") delete rm-rf fileName remote view/control (with UI Interface) to enable remote management, choose System Preference Settings> share and click Open remote management. Enter vnc: // 192.168.xxx.xx In the Safari Address of the local system browser and press Enter, in the pop-up window, click "Connect". In the "username and password" text box, enter the username and password for logon to the remote machine, and then click "OK ".
In addition, if the common Mac machine is used as the server, pay attention to the following Configuration:
1. Open sharing
-Click system preference settings-> share. Click to Open remote management.
2. Check whether the computer sleep is disabled
-Click "system preference settings"> "Node details:
-Check to prevent the computer from going to sleep automatically when the monitor is disabled.
-Uncheck this option to sleep the hard disk if possible.
-Select wake up for Network Access
-Check whether Automatic startup is enabled after power failure.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.