0

I accidentally deleted the output file of an sbatch job that is still running while deleting that of completed jobs.

I checked for .local/share/Trash and this folder does not even exist. Any chance I could retrieve this file using sbatch commands?

The same question was asked here as a comment, but no answers provided.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Toonia
  • 61
  • 1
  • 7

1 Answers1

0

If you are fortunate enough for the process to still be running, you can try the suggestions described here.

On an NFS server, there might be a file in the same directory named something like .nfs000000000e5dd56400042e84. If so, you can use tail -f to recopy it to another file. This file will disappear as soon os the job terminates.

On a local filesystem, you will need to SSH to the compute node, and look into /proc/<PID of process>/fd for the file descriptor of the deleted file. As above, you can use tail -f to recopy it to another file. This file will disappear as soon os the job terminates.

damienfrancois
  • 52,978
  • 9
  • 96
  • 110
  • Not fortunate to find the file using any of the suggestions. Process was still running but no trace of file in `/proc//fd`. – Toonia Mar 08 '23 at 17:28