Created
July 21, 2015 07:19
-
-
Save Kwpolska/07f9ff393c114507a10c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
import subprocess | |
import os | |
out = subprocess.check_output(['sudo', 'repquota', '-t', '/']) | |
homes = os.listdir('/home/') | |
for user in homes: | |
for line in out.splitlines(): | |
if user in line: | |
print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment