Tero Karvinen - Articles - Downloads - Courses - Contact

 
#!/bin/bash
# aboutusers - print information about human users
# (Actually a bash shell scripting example program)
# (c) 2006-03-06 Tero Karvinen www.iki.fi/karvinen
# GNU General Public License version 2
 
for DIR in /home/*
do
        USER=$(basename $DIR);
        echo "=== User $USER ===";
        echo -n "Files in home directory: "
        ls -l $DIR|wc -l;
        echo "last logins: ";
        last $USER;
        echo
done;
 

Last modified: 2006-03-06. Permanent url: http://www.iki.fi/karvinen/aboutusers.html

Tero Karvinen www.iki.fi/karvinen - Top - Validate HTML - Validate CSS