Created
December 18, 2014 18:19
-
-
Save nowthatsamatt/3a297dd91262cd5d9e72 to your computer and use it in GitHub Desktop.
hooraytime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sandbox_path='/home/SANDBOX/www/yaytime/website/sandbox' | |
userdir_array=($(ls -l /home/SANDBOX/www/yaytime/website/sandbox|awk '{print $9}')) | |
for i in "${userdir_array[@]}"; do | |
ls -tlh $sandbox_path/$i|tail -n$(expr $(ls -tlh|wc -l) - 11)|awk '{print $9}'|xargs -t -L 1 rm $sandbox_path/$i/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment