0

From the below output , I just want celesial and neetish user I can't figure how to do it though .

celestial@celestial:~$ sudo  repquota  /
*** Report for user quotas on device /dev/disk/by-uuid/e312e0f3-68d6-44f1-aecb-731bd4932bf3
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      -- 3777196       0       0         203861     0     0      
man       --    3088       0       0            368     0     0      
lp        --       0       0       0              1     0     0      
libuuid   --      24       0       0              2     0     0      
syslog    --     852       0       0             10     0     0      
avahi-autoipd --       4       0       0              1     0     0      
speech-dispatcher --       4       0       0              1     0     0      
lightdm   --     224       0       0             41     0     0      
colord    --      20       0       0              4     0     0      
celestial --   98880       0       0            956     0     0      
neetish   -+    1452    2000    3000            150    20    30  3days
5
  • Are your users in a group, or using a UID sequence that differs from system accounts? Or otherwise do you have a way of identifying a user account vs a system one?
    – Paul
    Jul 20, 2015 at 7:10
  • Nope the users are not in a group , orwise it was a simple solution
    – Neetz
    Jul 20, 2015 at 7:12
  • @Paul I don't a way to identify the system user :/
    – Neetz
    Jul 20, 2015 at 7:13
  • Do users only have home directories maybe?
    – Paul
    Jul 20, 2015 at 7:13
  • @Paul I think as :/ maybe ? but then I have to invlove like bash script here and maybe it is not other platforms like other os
    – Neetz
    Jul 20, 2015 at 7:20

1 Answer 1

0

The following gets the repquota results for anyone with a directory in /home:

 repquota -t / | head -5; for i in `ls -1 /home/` ; do repquota -t / | grep $i ; done

The first command just runs repquota to get the heading columns, then the for loop does requota a bunch of times grepping each directory name from /home.

8
  • it doesn't work
    – Neetz
    Jul 20, 2015 at 8:32
  • I get Block grace time: 7days; Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace repquota: Cannot open quotafile //aquota.user: Permission denied repquota: Quota file not found or has wrong format. repquota: Not all specified mountpoints are using quota. repquota: Cannot open quotafile //aquota.user: Permission denied repquota: Quota file not found or has wrong format. repquota: Not all specified mountpoints are using quota.
    – Neetz
    Jul 20, 2015 at 8:33
  • I gave sudo also :/
    – Neetz
    Jul 20, 2015 at 8:33
  • You need sudo before both repquota commands
    – Paul
    Jul 20, 2015 at 8:44
  • and do you have a solution for other OS ? like a genric OS ?
    – Neetz
    Jul 20, 2015 at 10:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .