PWD: View current working directory
Objective:
Linux with the PWD command to see the "Current working directory" of the full path, is often mentioned in the directory, more used in the production environment multi-level directory to see the current path, use this command to provide operations personnel/operators a lot of convenience, when you are not sure what directory you can type this command directly to do " Positioning. "
The last shared mkdir command and how to use the actual combat "Junior" mentioned in the PWD was just a simple summary, here to give you a detailed explanation of the PWD use method, in the future production environment to better control the Linux operating system.
Name
Pwd-print name of current/working directory current/working directory print names
How to use
PWD [Options] ... Commands can be followed directly by options.
Describe
-l,--logical
The output connection path when the directory connection link
-p,--physical
Avoid all symbolic links, output physical paths
Actual Demo:
to view the full path of the default working directory with the PWD command
1 [[email protected] ~]# cd/lcp/abc/vanos/ first into a directory 2[[email protected] vanos]# pwd use the PWD command to view the current working directory, and the following is the output directory result. 3 /lcp/abc/vanos
Use Pwd-p to display the actual path when a link exists in the directory
1 [[email protected] vanos]# CD/ETC/INIT.D/INIT.D for the connection path, what is the connection path price to share will be explained in detail, here only to understand, can be understood as a shortcut in Windows. 2[[email protected] init.d]# pwd simply using PWD only shows the results that are now being done. 3 /etc/init.d4 [[email protected] init.d]# pwd-p but using the-p parameter shows its actual path, Note that this When the P is uppercase 5 /ETC/RC.D/INIT.D
- l do not do too much description, for beginners only need to understand the-P function can be used in the actual production process, the use of the PWD default command can effectively improve work efficiency. Simple, easy-to-use and efficient basic principles for using Linux commands.
Linux pwd command details and how to use the actual combat "beginner"