Mac OS X Server Command-Line Administration - Apple
Mac OS X Server Command-Line Administration - Apple
Mac OS X Server Command-Line Administration - Apple
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
To type a command:<br />
m Wait for a prompt to appear in the Terminal window, then type the command and<br />
press Return.<br />
If you get the message command not found, check your spelling. If the error recurs,<br />
the program you’re trying to run might not be in your default search path. Add the<br />
path before the program name or change your working directory to the directory that<br />
contains the program. For example:<br />
[server:/] admin$ serversetup -getAllPort<br />
serversetup: <strong>Command</strong> not found.<br />
[server:/] admin$ /System/Library/<strong>Server</strong>Setup/serversetup -getAllPort<br />
1<br />
Built-in Ethernet<br />
[server:/] admin$ cd /System/Library/<strong>Server</strong>Setup<br />
[server:/System/Library/<strong>Server</strong>Setup] admin$ ./serversetup -getAllPort<br />
1<br />
Built-in Ethernet<br />
[server:/System/Library/<strong>Server</strong>Setup] admin$ cd /<br />
[server:/] admin$ PATH = "$PATH:/System/Library/<strong>Server</strong>Setup"<br />
[server:/] admin$ serversetup -getAllPort<br />
1<br />
Built-in Ethernet<br />
Correcting Typing Errors<br />
To correct a typing error before you press Return to issue the command, use the Delete<br />
key or press Control-H to erase unwanted characters and retype.<br />
To ignore what you have typed and start again, press Control-U.<br />
Repeating <strong>Command</strong>s<br />
To repeat a command, press Up-Arrow until you see the command, then press Return.<br />
To repeat a command with modifications, press Up-Arrow until you see the command,<br />
press Left-Arrow or Right-Arrow to skip over parts of the command you don’t want to<br />
change, press Delete to remove characters, type regular characters to insert them, then<br />
press Return to execute the command.<br />
Including Paths Using Drag-and-Drop<br />
To include a fully-qualified file name or directory path in a command, stop typing<br />
where the item is required in the command and drag the folder or file from a Finder<br />
window into the Terminal window.<br />
14 Chapter 1 Typing <strong>Command</strong>s