Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: how to get which user is on

by ambs (Pilgrim)
on Mar 28, 2005 at 19:09 UTC ( #442912=note: print w/replies, xml ) Need Help??

in reply to how to get which user is on

Some answers to some of your questions:
  • $> is your real user id
  • $ENV{HOME} is your home, if you are in a *nix like system

Alberto Simões

Replies are listed 'Best First'.
Re^2: how to get which user is on
by Fletch (Chancellor) on Mar 28, 2005 at 21:14 UTC

    $ENV{HOME} is likely to be the home directory of the current user, but don't count on it. Things such as su, sudo, and cron can commonly either leave it pointing at the wrong place or completely unset). Use the value from getpwuid to be certain.</pedant>

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2021-10-17 13:51 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (71 votes). Check out past polls.