EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09124
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] How can i delete thousands of fake users?
- To: <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] How can i delete thousands of fake users?
- From: Florian Heß <hess@ub.uni-heidelberg.de>
- Date: Fri, 9 Dec 2022 11:03:27 +0100
CAUTION: This e-mail originated outside the University of Southampton. Note xargs takes care of any limits opposed by the kernel concerning command line length. `xargs -a fake_users_ids.txt bin/delete_user REPOID` should do all fine. Regards F Hess Am 09.12.22 um 02:34 schrieb David R Newman via Eprints-tech:
Hi Christian, You could just add all the user IDs one after another to the delete_user script: ./delete_user REPO_ID `for ((x=5; x<=25590; x++)); { echo -n "$x "; }` However, I suspect that command may be too long for bash (i.e. your shell). You could use xargs but you probably don't want to call the delete_user script 25000+ times, as this will be slow compared to calling it just a few times with multiple arguments. So it may be better to write a bash script that passes 1000 user IDs at a time: #!/bin/bash for ((i=5; i<=25590; i=i+1000)); do ./delete_user REPO_ID `for ((j=i; j<i+1000 && j<=25590; j++)); { echo -n "$j "; }` done
- Follow-Ups:
- Re: [EP-tech] How can i delete thousands of fake users?
- From: Florian Heß <hess@ub.uni-heidelberg.de>
- Re: [EP-tech] How can i delete thousands of fake users?
- References:
- [EP-tech] How can i delete thousands of fake users?
- From: SGI Support | OST - Ostschweizer Fachhochschule <sgi-support@ost.ch>
- Re: [EP-tech] How can i delete thousands of fake users?
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] How can i delete thousands of fake users?
- From: Florian Heß <hess@ub.uni-heidelberg.de>
- [EP-tech] How can i delete thousands of fake users?
- Prev by Date: Re: [EP-tech] How can i delete thousands of fake users?
- Next by Date: Re: [EP-tech] How can i delete thousands of fake users?
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):