Go to the previous, next section.
Bash has several builtin commands whose definition is very similar
to csh.
pushd
pushd [dir | +n | -n]
Save the current directory on a list and then cd to
dir. With no
arguments, exchanges the top two directories.
+n
dirs) to the top of the list by rotating
the stack.
-n
dirs) to the top of the list by rotating
the stack.
dir
dirs command.
popd [+n | -n]
Pops the directory stack, and cds to the new top directory. When
no arguments are given, removes the top directory from the stack and
cds to the new top directory. The
elements are numbered from 0 starting at the first directory listed with
dirs; i.e. popd is equivalent to popd +0.
+n
dirs), starting with zero.
-n
dirs), starting with zero.
dirs [+n | -n] [-l]Display the list of currently remembered directories. Directories find their way onto the list with the
pushd command; you can get
back up through the list with the popd command.
+n
dirs when invoked without options), starting
with zero.
-n
dirs when invoked without options), starting
with zero.
-l
history [n] [ [-w -r -a -n] [filename]]
Display the history list with line numbers. Lines prefixed with
with a * have been modified. An argument of n says
to list only the last n lines. Option -w means
write out the current history to the history file; -r
means to read the current history file and make its contents the
history list. An argument of -a means to append the new
history lines (history lines entered since the beginning of the
current Bash session) to the history file. Finally, the
-n argument means to read the history lines not already
read from the history file into the current history list. These
are lines appended to the history file since the beginning of the
current Bash session. If filename is given, then it is used
as the history file, else if $HISTFILE has a value,
that is used, otherwise `~/.bash_history' is used.
. (see section Bourne Shell Builtins)
Go to the previous, next section.