Home » RDBMS Server » Server Administration » finding owner of a file or dir in Unix
finding owner of a file or dir in Unix [message #226476] Sat, 24 March 2007 00:13 Go to next message
a_developer
Messages: 194
Registered: January 2006
Senior Member
This is not really related to Oracle, but rather to Unix - so please bear with me. I am using Linux and new to Unix. I would like to find the owner of a file or directory. I tried
stat [Option] filename
, but unfortunately -u for option does not work... any advise?? Thanks.
Re: finding owner of a file or dir in Unix [message #226478 is a reply to message #226476] Sat, 24 March 2007 00:23 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
ls -l
ls -l filename.dat
Re: finding owner of a file or dir in Unix [message #226483 is a reply to message #226478] Sat, 24 March 2007 01:44 Go to previous messageGo to next message
a_developer
Messages: 194
Registered: January 2006
Senior Member
Thanks. But that will display everything. In that case, I would have to extract the value in the owner column. Is it possible to get only the owner id with a single command??
Re: finding owner of a file or dir in Unix [message #226516 is a reply to message #226476] Sat, 24 March 2007 08:46 Go to previous messageGo to next message
orausern
Messages: 826
Registered: December 2005
Senior Member
use cut command with that output and that should do.don't have access to unix today, but u can experiment and figure out.
Re: finding owner of a file or dir in Unix [message #226518 is a reply to message #226476] Sat, 24 March 2007 08:51 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
alterntively you could use "awk", but in either case you might be force to RTFM or in this case the man pages; unless you insist upon being spoon fed a total solution.
Re: finding owner of a file or dir in Unix [message #226626 is a reply to message #226518] Sun, 25 March 2007 23:23 Go to previous message
a_developer
Messages: 194
Registered: January 2006
Senior Member
Thanks to all of you.. I was just wondering if there is really a simple command to extract the file's owner.. I'm new to Unix and hence don't know if such command at all exists... I'll take it from here.. thanks again.
Previous Topic: why does oracle need EXTENTS?
Next Topic: OutoffMemory Error - When deploying a EAR file in 10g
Goto Forum:
  


Current Time: Fri Sep 20 13:35:30 CDT 2024