If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Owner of the directory

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-17-09, 12:51
vineelaregonda vineelaregonda is offline
Registered User
 
Join Date: May 2009
Posts: 43
Owner of the directory

Hi,

I have to check the owner of the directory for the list of hosts and have to take some action. Is there any command to find out the owner of the directory other than the "ls -ltr".

Please revert me as soon as possible.

Thanks,
Vineela
Reply With Quote
  #2 (permalink)  
Old 11-17-09, 16:02
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,229
What's wrong with ls?
Reply With Quote
  #3 (permalink)  
Old 11-17-09, 16:13
vineelaregonda vineelaregonda is offline
Registered User
 
Join Date: May 2009
Posts: 43
I am writing the script. I have directory names with me and have to find out the owner of the directory. Please help me in this regard.
Reply With Quote
  #4 (permalink)  
Old 11-17-09, 17:16
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,229
So, why don't you use the ls command?
Reply With Quote
  #5 (permalink)  
Old 11-18-09, 02:06
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,258
mabe this is what you want?
stat --printf=%U your_dir_name
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On