Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

RE: /bin/pwd (Re: Taint checking)

by ncw (Friar)
on Sep 25, 2000 at 22:12 UTC ( #33940=note: print w/replies, xml ) Need Help??


in reply to /bin/pwd (Re: Taint checking)
in thread Taint checking, File::Find and Cwd

I always thought of this tracking of your current directory to be shell magic just for the convenience of the user, eg an example (run on linux)

$ cd /usr/X11
$ pwd
/usr/X11
$ /bin/pwd
/usr/X11R6
$ ls -ld /usr/X11
lrwxrwxrwx   1 root     root            5 Oct 21  1999 /usr/X11 -> X11R6
But I see what you are saying in the case of the current directory being a deleted directory, eg :-
$ mkdir test
cd test
pwd ; /bin/pwd
/home/ncw/test
/home/ncw/test
rmdir .
$ pwd ; /bin/pwd
/home/ncw/test
/bin/pwd: cannot get current directory: No such file or directory
Anyway, getcwd() was what I expected Cwd to use, and I was very suprised to see this /bin/pwd thing!

Thanks for the explanation. I think from the above experinents /bin/pwd == getcwd() under linux, so on that platform at least it should be replaced with getcwd(). According to my man pages getcwd() is POSIX so pretty much any unix should support it now-a-days.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://33940]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2022-01-21 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?