[LON-CAPA-admin] how to remove old lonUsers data?

Lars ljensen at tmcc.edu
Sun Sep 29 21:55:21 EDT 2024


Hi Tod,

We have used this command to wipe out directories containing only
files older than 1000 days:

Enter on command line in /home/httpd/lonUsers/tmcc/* to erase student
directories in which every file is older than 1000 days:

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

Remove the echo when satisfied. Remove the -q to find out why a
directory is not being removed.

Sincerely,
Lars.

On Sun, Sep 29, 2024 at 3:44 PM Todd Pfaff via LON-CAPA-admin
<lon-capa-admin at mail.lon-capa.org> wrote:
>
> Our lonUsers directory tree has grown to several hundred gigabytes with
> data from the past decade or so.  We'd like to be able to discard some of
> the older data that is no longer needed, but there doesn't seem to be any
> obvious or documented method for doing this sort of operation.
>
> How does on go about safely removing old lonUsers data?
>
> Thanks,
> Todd
> _______________________________________________
> LON-CAPA-admin mailing list
> LON-CAPA-admin at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin

-- 


--

*Public Records Notice:* In accordance with Nevada Revised Statutes 
(NRS) Chapter 239, this email and responses, unless otherwise made 
confidential by law, may be subject to the Nevada Public Records laws and 
may be disclosed to the public upon request.


More information about the LON-CAPA-admin mailing list