On Tue, Nov 10, 2009 at 6:11 PM, Mika Pflüger <[email protected]> wrote: > And PLEASE: Before you run this, make a backup and try the command > replacing "rm -rf" with "ls" -- it will show you what will be deleted. > Check the list carefully, as I can't guarantee those one-liners are > really what you need and if I understood you correctly. > Note that with many users you might run into the "command line too > long" error. Then we have to think about something else involving > loops or "find"s
Here's another variation using "ls -lad" instead of "rm -rf": students="foo bar bat" for i in $students ; do echo ==$i cd /home/$i && ls -lad .g* done Adjust the student= line to your list of students. If the list of folders looks good, then replace the "ls -lad" with "rm -rf". And I concur with Mika: make a backup first. Good luck and let us know how things go. Regards, - Robert -- edubuntu-users mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-users
