Commit 2cf0b064 authored by Haarst, Jan van's avatar Haarst, Jan van
Browse files

script to report xfs quota status on login

parent b580e085
#!/bin/bash
# Small script to retrieve quota usage and settings for a user.
#set -o verbose
#set -o xtrace
# Get the real user ID
USERID=$(id -u `logname`)
USED=`/usr/sbin/xfs_quota -x -c "report -N -h -L $USERID -U $USERID" 2>/dev/null| grep '^#'|awk '{print $2}'`
SOFT=`/usr/sbin/xfs_quota -x -c "report -N -h -L $USERID -U $USERID" 2>/dev/null| grep '^#'|awk '{print $3}'`
echo -e "\nYou are using ${USED}B of your ${SOFT}B quota in your home folder\n"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment