Skip to content

Instantly share code, notes, and snippets.

@dade80vr
Last active September 5, 2017 13:03
Show Gist options
  • Save dade80vr/fd615aa50b26ae657038ad811c128fa3 to your computer and use it in GitHub Desktop.
Save dade80vr/fd615aa50b26ae657038ad811c128fa3 to your computer and use it in GitHub Desktop.
Bash script to check a given folder owner - Require AWK
#!/bin/bash
# Bash script to check a given folder owner - Require AWK
# By Davide Permunian (https://github.com/dade80vr)
#
# Usage : ./chkown.sh <folder>
# Example : ./chkown.sh /usr/local
#unquote next line if you want an output
#echo -en "The owner of $1 is: "
stat "$1" | awk '{print $5}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment