lsf

How to delete a lot of directories using LSF


I have access to LSF cluster. Is it possible to delete (rm -rf) a whole bunch of directories and take advantage of the LSF?

Thanks in advance.


Solution

  • This can be achieved given that the user who submits the job has permission to delete the directory. If the directory is local and distributed across many nodes this permission to delete should be the case on each node.

    You submission will be something like:

    bsub -q <queue name> -m <host/group> rm -rf <absolute path> 
    

    Of course the limitation is that you already know the path. But if the path changes and there are many paths you can use a script and then run that script as a job.

    If the number of paths are small you can also try -I to submit a shell interactive job and delete from the interactive shell

    bsub -q <interactive> -I sh