bash
if you are running OS X v10.3 or later and tcsh
if you are running an earlier version of the operating system.ls
command, by default, it lists the files in your home directory. To run this command, type ls
and press Return.ls -l
and pressing Return. The -l
flag tells the ls
command to change its default behavior.ls -l Desktop
and press Return. In that command, the word Desktop
is an argument that is the name of the folder that contains the contents of your OS X desktop.Utilities
folder within the Applications
folder at the top level of your hard drive. Its path is /Applications/Utilities/Terminal.app
.cat foo
, the cat
command prints the contents of the file foo
in the current directory. You can change the current directory using the cd
command.Path string | Description |
---|---|
. | The . directory (single period) is a special directory that, when accessed, points to the current working directory. This value is often used as a shortcut to eliminate the need to type in a full path when running a command.For example, if you type ./mytool and press return, you are running the mytool command in the current directory (if such a tool exists). |
. | The . directory (two periods) is a special directory that, when accessed, points to the directory that contains the current directory (called its parent directory). This directory is used for navigating up one level towards the top of the directory hierarchy.For example, the path ./Test is a file or directory (named Test ) that is a sibling of the current directory.Note: Depending on the shell, if you follow a symbolic link into a subdirectory, typing cd . directory will either take you back to the directory you came from or will take you to the parent of the current directory. |
~ or $HOME | At the beginning of a path, the tilde character represents the home directory of the specified user, or the currently logged in user if no user is specified. (Unlike . and . , this is not an actual directory, but a substitution performed by the shell.)For example, you can refer to the current user’s Documents folder as ~/Documents . Similarly, if you have another user whose short name is frankiej , you could access that user’s Documents folder as ~frankiej/Documents (if that user has set permissions on their Documents directory to allow you to see its contents).The $HOME environment variable can also be used to represent the current user’s home directory.In OS X, the user’s home directory usually resides in the /Users directory or on a network server. |
_
), and often a period (.
) followed by a file extension that indicates the type of file (.txt
, for example). Most other characters, including space characters, should be avoided because they have special meaning to the shell.
) immediately before the character in the path.My Disk
can be written as 'My Disk'
, 'My Disk'
, or My Disk
.Volumes
, at the root of the local file system. This directory contains all of the volumes attached to the local computer./Volumes/
followed by the volume name. For example, to access the Applications
directory on a volume named MacOSX
, you would use the path /Volumes/MacOSX/Applications
./
. Including the volume information still works, though, so if you are interacting with the shell from an application that is volume-aware, you may want to add it, if only to be consistent with the way you access other volumes. You must include the volume information for all volumes other than the boot volume.File descriptor | Description |
---|---|
stdin | The standard input file descriptor is the means through which a program obtains input from the user or other tools. By default, this descriptor provides the user’s keystrokes. You can also redirect the output from files or other commands to stdin , allowing you to control one tool with another tool. |
stdout | The standard output file descriptor is where most tools send their output data. By default, standard output sends data back to the user. You can also redirect this output to the input of other tools. |
stderr | The standard error file descriptor is where the program sends error messages, debug messages, and any other information that should not be considered part of the program’s actual output data. By default, errors are displayed on the command line like standard output. The purpose for having a separate error descriptor is so that the user can redirect the actual output data from the tool to another tool without that data getting corrupted by non-fatal errors and warnings. |
ABRT
) signal to the currently running process. In most cases this causes the process to terminate, although some tools may install signal handlers to trap this signal and respond differently. (See Trapping Signals in Advanced Techniques for details.)HUP
) signal to the shell, which it then passes on to the currently running program. If you want a program to continue running after you log out, you should run it using the nohup
command, which catches that signal and does not pass it on to whatever command it invokes.Command | Honda pcx 150 manual download. Meaning | Description |
---|---|---|
cat | (con)catenate Fleetwood mac gypsy video download. | Prints the contents of the specified files to stdout . |
Wps for mac. cd | change directory | Changes the current working directory to the specified path. |
cp | copy | Copies files (and directories, when using the -r option) from one location to another. |
date | date | Displays the current date and time using the standard format. You can display this information in other formats by invoking the command with specific flags. |
echo | echo to output | Writes its arguments to stdout . This command is most often used in shell scripts to print status information to the user. |
less and more | pager commands | Used to scroll through the contents of a file or the results of another shell command. This command allows forward and backward navigation through the text. The more command got its name from the prompt “Press a key to show more.” commonly used at the end of a screenful of information. The less command gets its name from the idiom “less is more”. |
ls | List | Displays the contents of the specified directory (or the current directory if no path is specified). Pass the -a flag to list all directory contents (including hidden files and directories).Pass the -l flag to display detailed information for each entry. Pass -@ with -l to show extended attributes. |
mkdir | Make Directory | Creates a new directory. |
mv | Move | Moves files and directories from one place to another. Teamspeak for mac download. You also use this command to rename files and directories. |
open | Open an application or file. | You can use this command to launch applications from Terminal and optionally open files in that application. |
pwd | Print Working Directory | Displays the full path of the current directory. |
rm | Remove | Deletes the specified file or files. You can use pattern matching characters (such as the asterisk) to match more than one file. You can also remove directories with this command, although use of rmdir is preferred. |
rmdir | Remove Directory | Deletes a directory. The directory must be empty before you delete it. |
Ctrl-C | Abort | Sends an abort signal to the current command. In most cases this causes the command to terminate, although commands may install signal handlers to trap this command and respond differently. |
Ctrl-Z | Suspend | Sends the SIGTSTP signal to the current command. In most cases this causes the command to be suspended, although commands may install signal handlers to trap this command and respond differently. Once suspended, you can use the fg builtin to bring the process back to the foreground or the bg builtin to continue running it in the background. |
Ctrl- | Quit | Sends the SIGQUIT signal to the current command. In most cases this causes the command to terminate, although commands may install signal handlers to trap this command and respond differently. |
MYFUNCTION
to the value MyGetData
in the global shell environment you would type the following command in a Terminal window:PATH
environment variable to control where it searches for these tools. It contains a colon-delimited list of paths to search--/usr/bin:/bin:/usr/sbin:/sbin
, for example.PATH
), and should not be added to it. If it were, then another user on a multi-user system could trick you into running a command by adding a malicious tool with the same name as one you would typically run (such as the ls
command) or a common misspelling thereof./
) or as a relative path starting with a directory name (which can be the .
directory). For example, to run the MyCommandLineProgram
tool in the current directory, you could type ./MyCommandLineProgram
and press Return.PATH
environment variable by doing the following:open
command.manpages
describes the organization of manual, and the format and syntax of individual man pages.man
command followed by the name of the thing you want to look up. For example, to look up information about the bash
shell, you would type man bash
. The man pages are also included in the OS X Developer Library (OS X Man Pages).apropos
command./usr/share/man
directory or see OS X Man Pages in the OS X Developer Library.Shell | Command |
---|---|
bash | help or bash -c help |
sh | man sh |
csh | builtins |
tcsh | builtins |
zsh | man zshbuiltins |