Hello
I am writing a script that needs to know who the owner is of a file or directory.
Code:
#!/bin/bash
for D in /home/*; do
OWNER=`gettheownersomethow $D`
echo "The owner of $D is $OWNER"
done
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?
Regards,
Frayja