Linux Directory Operations Command PWD New Linux operations, Common command directory
- PWD command
- Grammar
- Options
- Parameters
- Instance
PWD command
The PWD command is the full path to "view" the current working directory.
Grammar
pwd [选项]
Options
- -P: Shows the actual path instead of using the link path
- -L: Output connection path when directory connection link
- The output connection path when the directory connection link is not added by default
Parameters
PWD commands do not normally add parameters
Instance
- PWD does not add any parameters by default
[[email protected] mnt]# cd /etc/init.d[[email protected] init.d]# ls -ld /etc/init.dlrwxrwxrwx. 1 root root 11 May 2 04:29 /etc/init.d -> rc.d/init.d[[email protected] init.d]# pwd/etc/init.d
- The pwd +p parameter shows a physical path instead of a link path
[[email protected] init.d]# ls -ld /etc/init.dlrwxrwxrwx. 1 root root 11 May 2 04:29 /etc/init.d -> rc.d/init.d[[email protected] init.d]# pwd/etc/init.d[[email protected] init.d]# pwd -P/etc/rc.d/init.d
- The pwd+l parameter shows the link path
[[email protected] init.d]# ls -ld /etc/init.dlrwxrwxrwx. 1 root root 11 May 2 04:29 /etc/init.d -> rc.d/init.d[[email protected] init.d]# pwd -L/etc/init.d
Linux Directory Operations Command pwd