For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > August 2005 > UID question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author UID question
Tony Frasketi

2005-08-25, 9:55 pm

Is there an ASCII equivalent to the numeric value UID returned by
stat($filename)[4] and if so is there a function to aquire the ASCII
value... Also is the UID related to the owner of the file as shown in
the directory display ls -al in Unix?

If UID and file ownership is not, however related, is there a function
to obtain the file's owner name in ASCII format?

TIA
Tony Frasketi
John W. Krahn

2005-08-25, 9:55 pm

Tony Frasketi wrote:
> Is there an ASCII equivalent to the numeric value UID returned by
> stat($filename)[4] and if so is there a function to aquire the ASCII
> value... Also is the UID related to the owner of the file as shown in
> the directory display ls -al in Unix?
>
> If UID and file ownership is not, however related, is there a function
> to obtain the file's owner name in ASCII format?



my $user = getpwuid( (stat $filename)[4] );


perldoc -f getpwuid


John
--
use Perl;
program
fulfillment
Tony Frasketi

2005-08-26, 3:55 am

Thanks very much John.

John W. Krahn wrote:

>Tony Frasketi wrote:
>
>
>
>
>my $user = getpwuid( (stat $filename)[4] );
>
>
>perldoc -f getpwuid
>
>
>John
>
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com