Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the popd command of linux to delete records from the shell directory stack

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail about the use of linux's popd command to delete records from the shell directory stack. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Used to delete records from the Shell directory stack, if no option is added, the popd command first deletes the record at the top of the Shell directory stack, and then changes the current directory to the directory at the top of the new Shell directory stack.

Syntax format: popd [parameters]

Common parameters:

-n delete the nth directory from the right (n count from 0) + n delete the nth directory from the left (n count from 0)

Reference example

Displays the contents of the Shell directory stack, one per line:

[root@linuxcool] # dirs-v0 / sbin1 / etc2 / var/log

Remove / sbin from the shell directory stack:

[root@linuxcool ~] # popd/etc / var/log

Show the current working directory:

[root@linuxcool ~] # pwdetc

Remove the top stack directory from the directory stack:

[root@linuxcool ~] # popd/var/log

Remove the second directory from the right from the directory stack:

[root@linuxcool ~] # popd-2 this is how to use the popd command of linux to delete records from the shell directory stack. I hope the above can be helpful and learn more. If you think the article is good, you can share it for more people to see.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report