Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pwd(1) [freebsd man page]

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

pwd -- return working directory name SYNOPSIS
The pwd utility writes the absolute pathname of the current working directory to the standard output. Some shells may provide a builtin pwd command which is similar or identical to this utility. Consult the builtin(1) manual page. The options are as follows: -L Display the logical current working directory. -P Display the physical current working directory (all symbolic links resolved). If no options are specified, the -P option is assumed. ENVIRONMENT
Environment variables used by pwd: PWD Logical current working directory. EXIT STATUS
The pwd utility exits 0 on success, and >0 if an error occurs. SEE ALSO
builtin(1), cd(1), csh(1), sh(1), getcwd(3) STANDARDS
The pwd utility conforms to IEEE Std 1003.1-2001 (``POSIX.1''). BUGS
In csh(1) the command dirs is always faster because it is built into that shell. However, it can give a different answer in the rare case that the current directory or a containing directory was moved after the shell descended into it. The -L option does not work unless the PWD environment variable is exported by the shell. BSD
April 12, 2003 BSD

Check Out this Related Man Page

PWD(1)								   User Commands							    PWD(1)

pwd - print name of current/working directory SYNOPSIS
Print the full filename of the current working directory. -L, --logical use PWD from environment, even if it contains symlinks -P, --physical avoid all symlinks --help display this help and exit --version output version information and exit NOTE: your shell may have its own version of pwd, which usually supersedes the version described here. Please refer to your shell's docu- mentation for details about the options it supports. GNU coreutils online help: <> Report pwd translation bugs to <> AUTHOR
Written by Jim Meyering. COPYRIGHT
Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
getcwd(3) The full documentation for pwd is maintained as a Texinfo manual. If the info and pwd programs are properly installed at your site, the command info coreutils 'pwd invocation' should give you access to the complete manual. GNU coreutils 8.22 June 2014 PWD(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cut -d Question

I went through quite a few threads and didn't find anything on this. I also looked on other sites and couldn't turn up an answer. For completeness sake, I'm working off of solaris 10 in the korn shell environment. I wrote a script for a buddy to help him out with the following issue. He... (12 Replies)
Discussion started by: Janus
12 Replies

2. Shell Programming and Scripting

Combine Two Commands Output

How i can combine output of two commands in one file.......i tried this but it is not working although each command is working good seperately..... head -1 filename | tail -1 filename i think there is problem with command concatenator? (16 Replies)
Discussion started by: 33junaid
16 Replies

3. Shell Programming and Scripting

appending two string is not working

Dear Memebers appending string is not working in loop outside of loop itw working fine, but when i put in loop its not working. please look into this code and suggest me how to do this. supplierCode.txt --------------- UGEN SLAND CEL here is my script ------------------- ... (11 Replies)
Discussion started by: krishna9
11 Replies

4. UNIX for Dummies Questions & Answers

.exrc is not working

Hi I want to customise my vi environment.So i have created a a .exrc file in my working directory and written all set commands.But when i am invoking vi ,it is not taking any effect of the vi. Can anybody have any idea what is happening Thanks in advance Regds Sas (12 Replies)
Discussion started by: SasDutta
12 Replies

5. UNIX for Dummies Questions & Answers

crontab environment help

Hi, I've read many many threads and I'm still having problems (yes i read and it's suggested posts too). My problem is with the $PWD, yes, that's the only causing problems so i have exported the PATH, I've checked... (12 Replies)
Discussion started by: malky
12 Replies

6. Shell Programming and Scripting

Joining files in a complex way

if input1 1st row labels (S1or S2 or S3 or any (actually so many in original text file)) are similar to 1st column of input2 i.e "ID" merge them together based on input1 1st row labels. for example take S1..... input1 "aphab" "S1" "S2" "S3" "a" "A/A" "A/A" "A/A" "b" ... (19 Replies)
Discussion started by: stateperl
19 Replies

7. Shell Programming and Scripting

Passing unix variable to oracle parameters

Please help me how to pass some unix vairable to oracle. I have used below , but not displaying passed (inval) value. calling() { sqlplus -s $1/$2@$3 <<EOF begin exec call_sql($4); end; exit EOF } calling user pwd inst value1... (17 Replies)
Discussion started by: Jairaj
17 Replies

8. Shell Programming and Scripting

Array reference problem

i have a variable MYHOST that has my host name.depending on the host i have an array like A_<hostname>.Everytime i need to append the hostname to A_ to get the array.but in the shell script i am nt able to access the members of that array. code of what i hav done: export temp=A_$MYHOST for... (15 Replies)
Discussion started by: niteesh_!7
15 Replies

9. Shell Programming and Scripting

Listing files script

hey guys I am writing a bash script that compares 2 directories and lists the contents that are different in each directory. I have figured out how to do this but the only problem is that it lists the file like this: -rw-r--r-- 1 joey12 users 0 2010-10-29 16:13 test/file3 I want it to print... (16 Replies)
Discussion started by: Joey12
16 Replies

10. UNIX for Dummies Questions & Answers

Present Working Directory (not the full path)

Hi, Is there a command that tells you right away the current working directory? I know the command "pwd", but that one gives the full path. if pwd gives me: /a/b/c/d/ggg/HERE I want something that will give me: HERE Thanks, Gaurab (13 Replies)
Discussion started by: gaurab
13 Replies

11. Shell Programming and Scripting

Switching between shells

I don't know why, but it just isn't working how I want it to work. You might want to run it to see what I mean. Or you might be a genius (or just really good at unix) and know just by looking at it what the problem is. Have fun trying to figure this one out.:wall: (11 Replies)
Discussion started by: nowruzr
11 Replies

12. Shell Programming and Scripting

How to compare if the size of the directory is more than 500MB in unix

I use du -sk command to find the size of the directory but when i use the result of 'du -sk' into if statement its throwing error.. Could u solve with this..? (14 Replies)
Discussion started by: shaal89
14 Replies

13. Shell Programming and Scripting

Crontab help

Hi I am trying to create a cron job but i get an error I have 2 files my main shell script with html which is and another called which hold variables that I pass to by using the line ./source I want a cron job to refresh a html generated... (14 Replies)
Discussion started by: scriptnewbie
14 Replies

14. Shell Programming and Scripting

Expansion not working properly

I'm using an Ubuntu machine and expansion is not working properly. What would cause this? Do I need to check for any particular bash packages? $ ipcs -m | grep $USER | awk '{printf "%s ",$2}' $ ipcs -m | grep UNF | awk '{printf "%s ",$2}' 294912 1048577 425986 688131 786436 1245189... (14 Replies)
Discussion started by: cokedude
14 Replies

15. AIX

VI command not working

Hello all, I've got a production system that the DBA complained that the vi command was no longer working for the oracle service account for a particular instance. When I logged in as myself, I noticed that it wasn't working for my user either. When invoked, it just returns to the prompt with an... (21 Replies)
Discussion started by: ZekesGarage
21 Replies