Detailed explanation of pwd commands in CentOS

Source: Internet
Author: User

Pwd (Print Working Directory)

Name: pwd-print name ofcurrent/working directory enter the current working path

Syntax: pwd [option]

Parameter: -- help -- version

Instance:

1) display the current working path

[Root @ localhost ~] # Pwd

/Root

2) display the actual directory of the soft connection, rather than the directory of the soft connection. Parameter-P

[Root @ localhostnetwork-scripts] # cd/etc/init. d

Root@localhostinit.d # pwd

/Etc/init. d

[Root@localhostinit.d] # pwd-P

/Etc/rc. d/init. d


3) The pwd error shows the deleted directory.

[Root @ localhost init. d] # cd/opt/soft

[Root @ localhost soft] # mkdir removed

[Root @ localhost soft] # cd removed/

[Root @ localhost removed] # pwd

/Opt/soft/removed

[Root @ localhost removed] # rm ../removed-rf

[Root @ localhost removed] # pwd

/Opt/soft/removed

[Root @ localhost removed] #/bin/pwd

/Bin/pwd: couldn't find directory entry in ".." with matching I-node

[Root @ localhost removed] # cd

[Root @ localhost ~] # Pwd

/Root

[Root @ localhost ~] #

---------------------------- Subsequent self-Summary ----------------------------------

The pwd command should also be less functional, that is, to check where our current directory is and where the real-P directory is.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.