I am writing a script that needs to know who the owner is of a file or directory.
for D in /home/*; do
echo "The owner of $D is $OWNER"
The problem is, of course, the command to get the file or directory owner (in the code example `gettheownersomehow`).
Is there a command or trick that I could use to get this?