Skip to content

Instantly share code, notes, and snippets.

@Kwpolska
Created July 21, 2015 07:19
Show Gist options
  • Save Kwpolska/07f9ff393c114507a10c to your computer and use it in GitHub Desktop.
Save Kwpolska/07f9ff393c114507a10c to your computer and use it in GitHub Desktop.
#!/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