dirs (built-in Bash command)

Content

 

Data

License: GNU GPLv3 +
Version number: GNU Bash 5
Developer / owner: Free Software Foundation Inc.

Short description:

The manual page and help for the dirs built-in Bash command. Use the dirs command to display the directory stack. Displays a list of currently memorized directories without options. The default output of the command returns memorized directory names separated by spaces in a single line. The directories you want to remember are a pushd can be placed on the stack with the command, and popd with the command. The current directory is always the first directory in the stack.

 

 

Man page output

man bash
[...]
       dirs [-clpv] [+n] [-n]
              Without options, displays the list of currently remembered  directories.   The  de-
              fault display is on a single line with directory names separated by spaces.  Direc-
              tories are added to the list with the pushd command; the popd command  removes  en-
              tries  from  the  list.  The current directory is always the first directory in the
              stack.
              -c     Clears the directory stack by deleting all of the entries.
              -l     Produces a listing using full pathnames; 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.
              +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.

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

 

 

Help output

dirs --help
dirs: dirs [-clpv] [+N] [-N]
    A könyvtárverem megjelenítése.
    
    Megjeleníti a jelenleg megjegyzett könyvtárakat. A könyvtárakat a
    „pushd” paranccsal lehet a verembe rakni; és a „popd” paranccsal kivenni.
    
    Kapcsolók:
      -c        a könyvtárverem törlése az összes elem eltávolításával
      -l        a saját könyvtárat ne rövidítse a listázáskor egy tilde (~)
      -p        a könyvtárverem kiírása soronként egy elemmel
      -v        a könyvtárverem kiírása soronként egy elemmel, a vermen
                belüli pozíció jelölésével
    
    Argumentumok:
      +N        N darab bejegyzést jelenít meg az argumentum nélkül a dirs
                által megjelenített listán balról számolva, nullától kezdve.
      -N        N darab bejegyzést jelenít meg az argumentum nélkül a dirs
                által megjelenített listán jobbról számolva, nullától kezdve.
    
    Kilépési kód:
    Sikerrel tér vissza, kivéve érvénytelen argumentum vagy hiba esetén.

 

Related Content