Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: User Who Modified File

by tobyink (Abbot)
on Sep 26, 2012 at 14:04 UTC ( #995777=note: print w/ replies, xml ) Need Help??


in reply to User Who Modified File

What do you mean by "file"? Just a file on a (Unix-like) filesystem? If so, Perl's stat function returns a whole bunch of statistics on files, including the numeric user ID of the file's owner. The getpwuid function can convert that to the user name.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: User Who Modified File
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2015-07-04 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls