Command-Line SyntaxType commands on the command line, following the command prompt. When you press <Enter> after typing the command, the command is executed. While the command is executing, no system prompt displays. When the command finishes running, the system prompt displays, indicating that the shell is ready to accept another command. Tip While a command is executing, you can stop it by pressing <Ctrl+c>. A command consists of the command, options, and arguments in the following format:
where
The following command shows a command name, an option, and an argument:
Thels command lists the files in a directory. The argument is a path to a directory; the files in the directory specified by the argument (janet) are displayed on the screen. However, ls is a command that doesn't require an argument, using a default when you don't pass an argument. If you don't include a directory name, the ls command lists the files in the current directory. The -l is one of many options you can use with the ls command to determine the information displayed and its format. The -l option produces output with more information than the standard ls output. The output from the standard command, without the -l, is the following list of files in the directory /home/janet:
while the output from the ls command with the -l is longer, as shown below:
You can enter more than one option as follows:
You can enter more than one command, separated by a semicolon (;), as follows:
Tip You can enter commands that are more than one line long. Type a backslash (\) at the end of the line, before pressing Return, and the second line will be treated as a continuation of the first line.
|
Sunday, October 25, 2009
Command-Line Syntax
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment