linux - Is there a command to return the owner of a file? -
linux - Is there a command to return the owner of a file? -
is there shell command print owner of file?
i guess do:
ls -l | awk '{print $3}'
but feels there more straightforward reply problem.
try using stat(1)
[cnicutar@fresh ~]$ stat -c %u file.c cnicutar
there lots of format sequences available: user id, total size, etc.
linux shell scripting
Comments
Post a Comment