Pwd

维基百科,自由的百科全书
跳转到导航 跳转到搜索

Template:Lowercasepackage.lua第80行Lua错误:module 'Module:Crc32lua' not found

页面Module:Infobox/styles.css没有内容。

pwd
脚本错误:没有“InfoboxImage”这个模块。
脚本错误:没有“InfoboxImageVariant”这个模块。
The pwd command
原作者贝尔实验室
开发者多个开源软件商业软件开发者
首次发布1974年6月,​脚本错误:没有“TimeAgo”这个模块。​(1974-06
当前版本Template:Software version
源代码库页面Template:Plainlist/styles.css没有内容。Template:EditAtWikidata
引擎页面Template:Plainlist/styles.css没有内容。
    脚本错误:没有“Wd”这个模块。
Template:EditAtWikidata
操作系统Multics, Unix, Unix-like, V, Plan 9, Inferno, SpartaDOS X, PANOS, Windows CE, KolibriOS
平台跨平台
类型命令
许可协议coreutils: GPLv3
网站脚本错误:没有“WikidataIB”这个模块。
脚本错误:没有“Template wrapper”这个模块。

脚本错误:没有“Check for unknown parameters”这个模块。

类Unix系统和其他一些操作系统中,pwdTemplate:Langx[1][2][3]用于将当前工作目录的完整路径输出到标准输出[4][5][6][7][8][9][10]

实现[编辑]

Multics有一个 pwd 命令(是 print_wdir 命令的短名称)[11],Unix的pwd命令由此起源。[12]在大部分Unix shell,如Bourne shellashbashkshzsh中,它是内建命令 ,可以用POSIX C函数 getcwd()getwd() 轻易实现。

它还在SpartaDOS X[13]PANOS[14]KolibriOS[15]上可用。DOSCOMMAND.COM)和Microsoft Windowscmd.exe)中与之等价的是没有参数的cd命令。Windows PowerShell还提供对等的Get-Location cmdlet,以及标准的别称glpwd。在 Windows CE 5.0上,cmd.exe (Command Processor Shell)包含了pwd命令。[16]

自1987年的第二版起,Unix上的pwd就是X/Open可移植手册的一部分。它已被继承到POSIX.1第一版和单一UNIX规范中。[17]它还在Unix第五版中出现过。[18]GNU核心工具组打包的pwd版本由Jim Meyering编写。[19]

Windows PowerShell提供等价的“Get-Location”cmdlet并有标准别名“gl”和“pwd”。

数值分析环境MATLABGNU Octave包含一个 pwd 函数,行使类似的功能。[20][21]OpenVMS中则与show default等价。

*nix上的示例[编辑]

Command 解释
pwd 显示当前工作目录。例如:/home/foobar
pwd -P 显示当前工作目录的物理路径,若有任何符号链接名称则不显示。例如:在目录/home/symlinked下有一个指向/home/realdir的符号链接,则显示/home/realdir
pwd -L 显示当前工作目录的物理路径,且显示任何符号链接名称。例如:在目录/home/symlinked下有一个指向/home/realdir的符号链接,则显示/home/symlinked

注意:POSIX要求默认行为和提供 -L 开关时的行为相同。

工作目录环境变量[编辑]

在使用cd命令时,POSIX壳层会设置下列环境变量[22]

OLDPWD
上一个工作目录(由cd命令设置)。
PWD
当前工作目录(由cd命令设置)。

参见[编辑]

参考[编辑]

package.lua第80行Lua错误:module 'Module:Navbar/configuration' not found

  1. 脚本错误:没有“citation/CS1”这个模块。
  2. 脚本错误:没有“citation/CS1”这个模块。
  3. 脚本错误:没有“citation/CS1”这个模块。
  4. 脚本错误:没有“citation/CS1”这个模块。
  5. 脚本错误:没有“citation/CS1”这个模块。
  6. 脚本错误:没有“citation/CS1”这个模块。
  7. 脚本错误:没有“citation/CS1”这个模块。
  8. 脚本错误:没有“citation/CS1”这个模块。
  9. 脚本错误:没有“citation/CS1”这个模块。
  10. 脚本错误:没有“citation/CS1”这个模块。
  11. 脚本错误:没有“citation/CS1”这个模块。
  12. 脚本错误:没有“citation/CS1”这个模块。
  13. 脚本错误:没有“citation/CS1”这个模块。
  14. 脚本错误:没有“citation/CS1”这个模块。
  15. 脚本错误:没有“citation/CS1”这个模块。
  16. 脚本错误:没有“citation/CS1”这个模块。
  17. wc – 命令与工具(Commands & Utilities)参考,单一UNIX®规范第7期,由国际开放标准组织发布
  18. pwd(1) – FreeBSD通用命令(General Commands)手册页
  19. pwd(1) – Linux程序员手册页 – 用户命令(User Commands)
  20. 脚本错误:没有“citation/CS1”这个模块。
  21. 脚本错误:没有“citation/CS1”这个模块。
  22. 脚本错误:没有“citation/CS1”这个模块。