1

I like to copy this file:

# lsof +L -p XXX

Anime4KCP 78674 evar   14w   REG                1,6 101187628     0          8682526126 /Users/evar/Base/_Code/Misc/Anime4KCPP/bin/output/output_anime4kcpp_(Hi10)_Monster_-_28_(DVD_480p)_(Figmentos).mp4_tmp_out.mp4

Is this possible? I'm on macOS, but I'm curious for other OSes as well.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
HappyFace
  • 1,493
  • 9
  • 21
  • 1
    On Linux, see https://unix.stackexchange.com/questions/61820/how-can-i-access-a-deleted-open-file-on-linux-output-of-a-running-crontab-task. But that's specific to OSes with a Solaris-like `/proc`, such as Linux. That thread won't help you on macOS. – Gilles 'SO- stop being evil' May 06 '20 at 17:25
  • If it was open in read (r or u letter) mode, ptrace(2)-ing it (eg: with gdb) could offer options, but it's in write mode. – A.B May 06 '20 at 18:33

0 Answers0