Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pwd(1) [v7 man page]

PWD(1)							      General Commands Manual							    PWD(1)

NAME
pwd - working directory name SYNOPSIS
pwd DESCRIPTION
Pwd prints the pathname of the working (current) directory. SEE ALSO
cd(1) PWD(1)

Check Out this Related Man Page

PWD(1)							    BSD General Commands Manual 						    PWD(1)

NAME
pwd -- return working directory name SYNOPSIS
pwd [-LP] DESCRIPTION
pwd writes the absolute pathname of the current working directory to the standard output. The following options are available: -L If the PWD environment variable is an absolute pathname that contains neither "/./" nor "/../" and references the current directory, then PWD is assumed to be the name of the current directory. -P Print the physical path to the current working directory, with symbolic links in the path resolved. The default for the pwd command is -P. pwd is usually provided as a shell builtin (which may have a different default). EXIT STATUS
The pwd utility exits 0 on success, and >0 if an error occurs. SEE ALSO
cd(1), csh(1), ksh(1), sh(1), getcwd(3) STANDARDS
The pwd utility is expected to be conforming to IEEE Std 1003.1 (``POSIX.1''), except that the default is -P not -L. BUGS
In csh(1) the command dirs is always faster (although it can give a different answer in the rare case that the current directory or a con- taining directory was moved after the shell descended into it). pwd -L relies on the file system having unique inode numbers. If this is not true (e.g., on FAT file systems) then pwd -L may fail to detect that PWD is incorrect. BSD
October 30, 2003 BSD
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding current working dir path

Hi Folks, In a Unix (ksh) script, is there a way to determine the current working directory path of another logged-in user? Of course, I can use "pwd" to find my own path. But, how do I find it for another active user? Thanks for any input you can provide. LY (6 Replies)
Discussion started by: liteyear18
6 Replies

2. UNIX for Dummies Questions & Answers

Unable to view contents of a directory

Hi, first post here be gentle. Very new to Unix. Using HP-UX 10.20 I CD into a remote directory on one machine $ cd /net/remote hostname yet when I do an ll in this directory none of the contents appear. It just is empty. when I do the same command from another machine, $ cd... (13 Replies)
Discussion started by: maddave
13 Replies

3. UNIX for Dummies Questions & Answers

echo $SHELL, $PWD and etc.

hi, this echo $SHELL will give the shell name.. how to get the other list of variables (besides SHELL) values? and also, different shells have different variable names (example SHELL) (10 Replies)
Discussion started by: yls177
10 Replies

4. Shell Programming and Scripting

replacing with `pwd`

Hi E(uni)xperts, I have a file in which I need to replace some text with the current path of the execution. meaning.. if I am running from /user/oldtrash/scripts and the file contains "this is ur directory current_dir" then I should see the file content as "this is ur... (6 Replies)
Discussion started by: oldtrash
6 Replies

5. IP Networking

Enable PWD command on anonymous FTP?

Hello everyone - First post here, I'm trying to connect to an anonymous ftp server and I am told by the server admin that I cannot have access to the "print working directory" command. I need to have access to this command in order for my (and my clients) preferred ftp client to connect. (the... (9 Replies)
Discussion started by: HiredGun79
9 Replies

6. IP Networking

ftp dir and pwd commands

Hi, I have a conenction to remote server that I'm sending files too via FTP. The problem I have is that when the file gets delivered it is 0 (zero) size. I've manually connected and logged on. The only command I can successfully execute is pwd. When I do a dir or a put command it will... (7 Replies)
Discussion started by: nhatch
7 Replies

7. Shell Programming and Scripting

pwd & cd commands not working in shell script

Here is my script #!/bin/bash pwd cd /var/lib/pgsql Both "pwd" and "cd" are not executed is there any other way i can change the current working directory to /var/lib/pgsql pls help! (9 Replies)
Discussion started by: perk_bud
9 Replies

8. HP-UX

pwdx equivalent on HP

In sun solaris, pwdx will give the print working directory. Suppose I have 5 databases running on different oracle versions. If I want to know what database is running on what oracle version, I just give pwdx <process id>. It will show the oracle home details. Could you give me the... (10 Replies)
Discussion started by: oracleuser
10 Replies

9. Shell Programming and Scripting

echo $PWD doesn't work

I have entry in the my .profile like below, but still i see $PWD is not defied in my system export PS1=$LOGNAME@`hostname`':'$PWD'>' echo $PWD also gives me nothing, my env list also give no entry for PWD.Can someone help me setting PWD variable. I use /bin/sh (9 Replies)
Discussion started by: yesmani
9 Replies

10. UNIX for Dummies Questions & Answers

set prompt = pwd

Assume that you want to set your prompt to display the current working directory followed by a percent symbol and then a space. The command pwd can be used to display this information, so explain why the following command does not have the expected result: set prompt=" `pwd`'%' " Its a... (7 Replies)
Discussion started by: Blockshelf
7 Replies

11. Shell Programming and Scripting

Make pwd print escape character

I decided I wanted to have the cd command print my full working directory after each cd command, so I put this cw command in .bashrc as a function. cw () { cd "${1}" pwd }While this works I would like pwd to print escapes when a space in a directory name exists. This would... (7 Replies)
Discussion started by: jelloir
7 Replies

12. Shell Programming and Scripting

pwd in a variable

is there anyway i could store the output of pwd that is the path in a variable...? (7 Replies)
Discussion started by: vivek d r
7 Replies

13. UNIX for Dummies Questions & Answers

$PWD vs `pwd`

Hi, can anyone expalin the real importance of PWD as a variable. However pwd command and $PWD is going to give the same result, then why do we have 2 different things. Please give some example which illustrates the difference between both. Thanks (9 Replies)
Discussion started by: pandeesh
9 Replies

14. Red Hat

Does the pam_pwdfile module support clear text passwords?

I need to utilize pam_pwdfile in order to authenticate virtual users in vsftpd. I know I can utilize htpasswd2 -m to create a password file however it is vital since I am administrating several machines in our organization that the password generated be in clear text. Does anyone on here know if... (10 Replies)
Discussion started by: colbyshores
10 Replies

15. Shell Programming and Scripting

Help with 'pwd' command

Dear all, I am trying to use 'pwd' command in following way. current_directory == /dirA/dirB/test/dirC if ; then do this fi I am not sure how to pass this in command way. Please help! thanking you, emily (10 Replies)
Discussion started by: emily
10 Replies