[LON-CAPA-admin] Removing old users from lon-capa

Lars ljensen at tmcc.edu
Fri Dec 19 13:46:55 EST 2014


Hi Everyone,

We have a lot of old students registered in lon-capa as users, and I'm
thinking about removing them. Both out of respect for their privacy.
It would also to be nice to save some space in our lon-capa back-up
files which are getting quite large, mainly because of the student
directories on the server.

What is the general opinion on erasing old student directories? Is
anyone already doing this?

One way to do it is to check the age of the files in each directory
under lonUsers and erase directories in which all files are older than
a certain age, say 1000 days.

Something like:

for d in ./*; do find "$d" -mindepth 0 -mtime -1000 -print -quit |
echo grep -q . || rm -rf "$d"; done

(Remove the echo to take action. Remove the -q to find out why a
directory is not being removed.)

Similarly, is there an effective way to remove old courses from lon-capa?

Thanks,
Lars.


More information about the LON-CAPA-admin mailing list