Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use the pwd and dirs directory view commands in Linux

Shulou Source: shulou.com Published: 2022-06-01 08:59:45 09月19日 Update

This article mainly explains the "how to use the Linux pwd and dirs directory view commands", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "how to use Linux pwd and dirs directory view commands" it!

Pwd displays the current directory

-L-- logical

Show current directory

-P,-- physical

Displays the actual physical address of the current directory

-- help help

-- version version

Example:

The code is as follows:

[root@rudder home] # pwd # shows the current directory

/ home

The [root@web mail] # pwd-P # directory is a soft connection that shows the actual physical address

/ var/spool/mail

[root@web mail] # pwd-L #-L display, logical address

/ var/mail

Dirs: displaying records in the catalog stack

Grammar: dirs [- clpv] [+ N] [- N]

Parameters:

+ n the current directory shall prevail, showing the directory with the nth stroke from the left.

-n the current directory shall prevail, showing the catalogue of the nth pen from the right.

-l displays the complete record of the directory.

Example 1

The code is as follows:

[root@rudder home] # dirs

/ home

Example 2

The code is as follows:

[root@localhost zhangy] # dirs # display directory stack

/ home/zhangy / usr

[root@localhost zhangy] # dirs-1

/ home/zhangy

[root@localhost zhangy] # dirs + 1

/ usr

Thank you for your reading, the above is "how to use the Linux pwd and dirs directory view commands" content, after the study of this article, I believe you on how to use Linux pwd and dirs directory view commands in this problem have a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Directory command code address learning content actual physics right that is ideas situations articles more versions knowledge knowledge points articles follow logic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Linux Redmi OPPO Reno Docker