[K12OSN] Quick way to empty student folders
Chris Hobbs
chobbs at silvervalley.k12.ca.us
Thu Sep 16 23:32:31 UTC 2004
Jim Christiansen wrote:
> Lat year I used some method to empty student folders... What ever it
> was I can't think of it.
> Has anyone used a quick way to empty the contents of all of the
> folders in /home/usernames ?
>
> I need to keep all of the student folders in /home, but everything in
> them needs to go...
>
for i in /home/*; do rm -rf /home/$i/*; done
NOT TESTED -- POSSIBLY DANGEROUS -- COULD CAUSE GLOBAL WARMING
OK, you're on your own if you run it, but it makes sense to me...
--
Chris Hobbs Silver Valley Unified School District
Head geek: Technology Services Coordinator
webmaster: http://www.silvervalley.k12.ca.us/~chobbs/
postmaster: chobbs at silvervalley.k12.ca.us
pgp: http://www.silvervalley.k12.ca.us/~chobbs/key.asc
More information about the K12OSN
mailing list