How to gracefully stop occ files scan?

I have NC v29.0.7 on Ubuntu 23.10 with MySql. I started few hours ago occ files:scan --all, how can I stop it gracefully? ideally the db should remain in a consistent state, e.g. there should remain no bad file locks in it.

How many files are to be scanned?

thousands of them

And what is the current state of occ now? - It is more than 2 weeks ago, that you posted it.