In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Linux dirs command use method is what the relevant knowledge, detailed and easy to understand, simple and fast operation, has a certain reference value, I believe that everyone read this Linux dirs command use method is what the article will gain, let's take a look at it.
The dirs command is used to display all records in the current directory stack (the dirs command without parameters displays records in the current directory stack). Dirs always displays the contents of the course directory and then the stack; even if the directory stack is empty, the dirs command displays only the course directory.
Dirs displays the directory stack.
Summary dirs [-clpv] [+N] [-N] Main purpose Display directory stack.
Empty the directory stack.
Option-c Empty the directory stack. -l Contents within the stack that begin with ~ expand when displayed. -p Displays each directory in a row within the directory stack. -v Display each directory in the directory stack in rows and precede each row with the position number in the stack. Parameter +N (optional): The Nth directory from the left will be displayed in the list displayed by executing the dirs command without parameters. (Counting from 0)
-N (optional): The Nth directory from the right will be displayed in the list displayed by executing the dirs command without parameters. (Counting from 0)
The return value returns success unless an illegal option is provided or an execution error occurs.
Example #Add directory to stack. [user2@pc ~]$ dirs ~ [user2@pc ~]$ pushd -n ~/Desktop ~ ~/Desktop [user2@pc ~]$ pushd -n ~/Pictures ~/Pictures ~/Desktop [user2@pc ~]$ pushd -n ~/bin ~/Pictures ~/Desktop #Examples of options and parameters: [user2@pc ~]$ dirs -l /home/user2 /home/user2/bin /home/user2/Pictures /home/user2/Desktop [user2@pc ~]$ dirs -p ~ ~/bin ~/Pictures ~/Desktop [user2@pc ~]$ dirs -v 0 ~ 1 ~/bin 2 ~/Pictures 3 ~/Desktop [user2@pc ~]$ dirs +2 ~/Pictures [user2@pc ~]$ dirs -2 ~/bin [user2@pc ~]$ dirs -c [user2@pc ~]$ dirs ~ Note that bash's directory stack commands include dirs popd pushd.
The current directory is always at the top of the directory stack.
This command is a bash built-in command. For help information, please see the help command.
About "Linux dirs command use method is what" the content of this article is introduced here, thank you for reading! I believe that everyone has a certain understanding of the "Linux dirs command use method" knowledge, if you want to learn more knowledge, welcome to pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.