Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: how to know the owner of the file in unix

by Roger (Parson)
on Aug 29, 2005 at 12:27 UTC ( #487388=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perldoc -f stat
    
    ...
                  10 ctime    inode change time in seconds since the epoch
    + (*)
                  11 blksize  preferred block size for file system I/O
                  12 blocks   actual number of blocks allocated
    
  2. or download this
    open MYFILE, '<filename' or die "Can not open: $!";
    my $uid = (stat MYFILE)[4];
    close MYFILE;
    
    print "UID = $uid\n";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-06-18 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (90 votes). Check out past polls.

    Notices?