In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the pwd command of the Linux system. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Pwd is an acronym for Print Working Directory and its function is to display the full path of the current working directory. Execute the pwd directive to immediately know the absolute path name of your current working directory.
Syntax pwd [--help] [--version] parameter description:-help online help.
-version displays version information.
Example 1: view the current path [root@localhost var] # pwd / var12 example 2: view the current path and enter the / var directory without using the connection path [root@localhost ~] # cd / var/ #. There is a mail connection file in this directory, which is easy to compare and view [root@localhost var] # ll total 164. Drwxr-xr-x 12 root root 4096 Apr 22 19:56 log lrwxrwxrwx 1 root root 10 Oct 17 2015 mail-> spool/mail drwxr-xr-x 2 root root 4096 May 11 2011 nis. [root@localhost var] # cd mail/ # enter the mail directory, and mail is the connection file. [root@localhost mail] # pwd # by default, the full path of the connection file is directly displayed using the connection file. / var/mail [root@localhost mail] # pwd-P # does not use logical paths to connect files to the final point / var/spool/mail example 3: when connecting files in multiple layers, the full path of all connected files is displayed [root@localhost ~] # ll # / root directory there is a dir1 directory The test connection file points to the dir1 directory total 12 drwxr-xr-x 2 root root 4096 Apr 24 05:51 dir1 lrwxrwxrwx 1 root root 5 Apr 24 05:54 test-> dir1/ [root@localhost ~] # ll / home/ # / home directory there is a test connection file Point to / root/test connection file total 20 drwx- 16 sgl sgl 4096 Oct 17 2015 sgl lrwxrwxrwx 1 root root 10 Apr 24 05:55 test-> / root/test [root@localhost ~] # cd / home/test/ # enter / home/test [root@localhost test] # pwd # default via cd command Show only the full path of the connection file / home/test [root@localhost test] # pwd-P # shows the full path of the file to which the connection file finally points. Notice that this is not / root/test. / root/dir1 on the Linux system pwd command how to share here, I hope the above content can be of some help to you, can learn more knowledge. 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.
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.