Bash - dirs (list of remembered directories)

Bash Liste Des Attaques Ovh

Bash - dirs (list of remembered directories)

About

Stack/list of remembered directories.

You can change of directories and return to the directory from which you came.

Syntax

dirs [-clpv] [+n] [-n]
  • Without options, displays the list of currently remembered directories.
  • +n Displays the nth entry counting from the left of the list shown by dirs when invoked without options, starting with zero.
  • -n Displays the nth entry counting from the right of the list shown by dirs when invoked without options, starting with zero.
  • -c Clears the directory stack by deleting all of the entries.
  • -l Produces a longer listing; the default listing format uses a tilde to denote the home directory.
  • -p Print the directory stack with one entry per line.
  • -v Print the directory stack with one entry per line, prefixing each entry with its index in the stack.

Management

Return value

The return value is 0 unless an invalid option is supplied or n indexes beyond the end of the directory stack.

Display

The default display is on a single line with directory names separated by spaces.





Discover More
Bash Liste Des Attaques Ovh
Bash - (Builtin|Intern|System|Reserved|Shell) variable name

Reserved variable name are named that have a special meaning for the bash shell. PS1 defines the shell's command-line prompt. HOME defines the home directory for a user. PATH defines a list...
Bash Liste Des Attaques Ovh
Bash - Builtin Commands

builtin refers to: a builtin command. See or to the specific builtin command. See (useful when defining a function whose name is the same as a shell builtin) The builtin command execute the specified...
Bash Liste Des Attaques Ovh
Bash - Directory stack

The directory stack permits to navigate and come back in the directory tree. Directories are added to the list with the pushd command; See pushd The popd command removes entries from...
Bash Liste Des Attaques Ovh
Bash - Tilde (~) Expansion

The tilde expansion replaces the tilde with a path value which is dependent of the syntax. If the tilde expansion fails, the word is unchanged. If a word begins with an unquoted tilde character (~),...
Bash Liste Des Attaques Ovh
Bash - popd (Builtin command)

popd removes entries from the directory stack. See dirs. With no arguments, removes the top directory from the stack, and performs a cd to the new top directory. where: +n - Removes the nth...
Bash Liste Des Attaques Ovh
What is pushd (Push Directory) in Bash?

Adds a directory to the top of the directory stack, or rotates the stack, making the new top of the stack the current working directory. dirs With no arguments, exchanges the top two directories...



Share this page:
Follow us:
Task Runner