Getting the Owner of a File in Linux

Posted on Mon 25 February 2008 in Development • Tagged with Shell Scripting, Bash

Ran across this problem where I needed root to execute a script as whoever owns it. The solution is simple and should work most everywhere. Basically it just uses the standard "stat" program and uses the print formatting option to only output the name of the owner. Here I use ...


Continue reading