Linux dirs command to display records in the directory stack

  
 

dirs is used to display records in the directory stack. The dirs always shows the directory of course, and then the contents of the stack; even if the directory stack is empty, the dirs command still only displays the directory of course.


Syntax format
dirs [+/-n -l]dirs [parameters]


parameters
-c: delete directory stack All records -l: Display in full format -p: One directory is displayed in one line -v: One directory per line to display the contents of the directory stack, plus the number +N before each directory: Display from left to right The nth directory, the number starts from 0 -N: displays the nth day record from right to left, the number starts from 0


example

displays the details of the current directory . The command and display results are as follows:
$ dirs -l/Users/liuht/.ssh

Copyright © Windows knowledge All Rights Reserved