#!/bin/bash
ALL_USR_DIR=$(cat /etc/passwd | \
awk -F: 'BEGIN{ORS="\n"}{if (($7 != "/bin/nologin")&&($7 != "/sbin/nologin")){print $1 ":" $6 }}')
for USR in $ALL_USR_DIR;
do
echo $USR | awk -F: '{print $1}'
USR_DIR=`echo $USR | awk -F: '{print $2}'`
du -hs $USR_DIR
done
阅读(2193) | 评论(4) | 转发(0) |