Last active
March 6, 2017 21:17
-
-
Save darknoon29/0e444ba16842b4e78d0b1d2a88558424 to your computer and use it in GitHub Desktop.
OGSpy User Status
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/sh | |
#Script permettant de connaitre l'utilisation des sites | |
# Informations à compléter | |
pass_mysql_root="boubou" | |
#username="allyu68" | |
for username in `ls -1d /home/* | sed 's/\/home\///'` | |
do | |
echo "############$username##############" | |
mysql -u root -p"$pass_mysql_root" -D "$username" -e "SELECT user_name ,FROM_UNIXTIME(user_lastvisit) FROM ogspy_user WHERE user_id=1;SELECT config_value FROM ogspy_config WHERE config_name='version';" | |
#Taille Répertoire | |
echo "Taille répertoire:" | |
du -sh /home/"$username" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment