Subj : Re: Determine file ownership using bash/bourne shell To : comp.os.linux From : Jeff Silverman Date : Wed Aug 18 2004 09:10 pm On Wed, 18 Aug 2004 12:17:24 -0700, Chandrashekar Tippur wrote: > All, > > Is there a way to figure out the ownership of a file on Redhat Linux > using Bash or bourne shell. > > Shekar There is more than one way to do it. ls -l $FILE | awk '{print $3; }' will output the owner of a file named in symbol FILE on standard output. If you want the owner in a symbol, then something like: [jeffs@black jeffs]$ FILE=run1.txt [jeffs@black jeffs]$ Y=`ls -l $FILE | awk '{print $3; }'` [jeffs@black jeffs]$ echo $Y root [jeffs@black jeffs]$ should do the trick. .