I have around 100 users in sun server and have default home directory in /usr/home/<username>
I want to clean their home directory time to time to make free space on root, as users generate many output files during usage of application.
My idea is, generate a file with following command
# cd /usr/home
# du -sk * > tmp.dat
Now I want to read one by one record in tmp.dat and pick the user name and execute # rm /usr/home/<username/* command and reach to 2nd record. Loop should be execute till the time tmp.dat not reach to eof().