Home United States USA — software Master the macOS command line: How to use the command manual in...

Master the macOS command line: How to use the command manual in Terminal

223
0
SHARE

How can you learn about all those mysterious Terminal commands, such as ls or cd ? Is it some kind of arcane knowledge, handed down only …
How can you learn about all those mysterious Terminal commands, such as ls or cd? Is it some kind of arcane knowledge, handed down only to initiates after grueling initiations? Well, no. Actually, anyone can learn about Terminal commands, if they know where to look. The key to Terminal wisdom is the man command. It summons manual (or man) pages for almost any command; they’re the equivalent of a help system for the command line. In fact, man itself is a command, whose role is to format and display this documentation. First, launch Terminal (in your /Applications/Utilities folder). Then, if you type man pwd, for example, Terminal will display the man page for the pwd command. All man pages have a common format. They begin with name (the name of the command) and a brief description of what it does. The pwd command I looked at above shows the following: pwd — return working directory name Next comes synopsis, which shows the command options, or flags, that you can use with it. For pwd, there are two options: – L and -P. These options are explained in the description section: As you can see here, each of the two options is explained, and a final sentence tells you that the command assumes that the -L option is desired if no other option (and there’s only one) is specified.

Continue reading...