diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 66e219b..3c5af85 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -281,6 +281,7 @@ unset OPTIND unset clean unset network + du_params="-ha" while (( $# > 0 )); do case $1 in -c | -y | --clean ) @@ -288,7 +289,7 @@ -n | -net | --network ) network="Y" ;; -s | -sum | --summarize ) - summarize="-s" ;; + du_params="-sh" ;; * ) echo " ERROR: Option '$1' with value '$2' not recognized. @@ -322,7 +323,7 @@ $sudo find $dir -name TRASH | while read trash; do if [[ "$trash" != "" && `$sudo ls -a $trash` ]]; then echo "Found $trash:" - $sudo du -ha $summarize $trash | sort -h + $sudo du $du_params $trash | sort -h if [[ "$clean" == "Y" ]]; then echo "Cleaning trash..." $sudo sh -c "cd $trash; rm -rfv ..?* .[!.]* *" @@ -332,7 +333,7 @@ $sudo find $dir $maxdepth -name "*"Trash"*" | while read trash; do if [[ "$trash" != "" && `$sudo ls -a $trash` ]]; then echo "Found $trash:" - $sudo du -ha $summarize $trash | sort -h + $sudo du $du_params $trash | sort -h if [[ "$clean" == "Y" ]]; then echo "Cleaning trash..." $sudo sh -c "cd $trash; rm -rfv ..?* .[!.]* *" @@ -349,7 +350,7 @@ sudo find $dir -name TRASH | while read trash; do if [[ "$trash" != "" && `sudo ls -a $trash` ]]; then echo "Found $trash:" - sudo du -ha $summarize $trash | sort -h + sudo du $du_params $trash | sort -h if [[ "$clean" == "Y" ]]; then echo "Cleaning trash..." sudo sh -c "cd $trash; rm -rfv ..?* .[!.]* *" @@ -359,7 +360,7 @@ sudo find $dir -name .Trash"*" | while read trash; do if [[ "$trash" != "" && `sudo ls -a $trash` ]]; then echo "Found $trash:" - sudo du -ha $summarize $trash | sort -h + sudo du $du_params $trash | sort -h if [[ "$clean" == "Y" ]]; then echo "Cleaning trash..." sudo sh -c "cd $trash; rm -rfv ..?* .[!.]* *"