The stupid question is the question not asked | |
PerlMonks |
Re: how to find out USERNAME from a given file?by AgentM (Curate) |
on Apr 22, 2001 at 09:36 UTC ( [id://74537]=note: print w/replies, xml ) | Need Help?? |
Use the fourth element in lstat/stat and use getpwuid. The username is the first element returned.
Perhaps not overly OS-independent, but it gets the job done under UN*X.
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
In Section
Seekers of Perl Wisdom
|
|