I just started using tmux; out of muscle memory (was a screen user) I tried to create a new session like this: tmux -S mySession, and after I detached, a socket named mySession= appeared in my working directory. I just rmed it and now there's a stale file handle like .nfs00000000014e6d6b000160d2= which I can't remove (Device or resource busy).

  • Perhaps that file is being used by the tmux session you detached? Did you try to quit the detached window to see if the file disappears? – HeatfanJohn Aug 10 '16 at 18:28
  • It's still there even after I kill-server; according to this post, "tmux keeps these sockets around for some amount of time even if no current tmux session is using them." – Yibo Yang Aug 10 '16 at 21:02

A file such as .nfs00000000014e6d6b000160d2 is generated whenever an open file is deleted from an NFS mounted filesystem.

In your case you'll still have a tmux background process running. If you do a ps ax you'll see it. If you kill that off then the file will be closed and should be autocleaned.

  • Did the trick, thanks. Somehow it didn't occur to me that tmux still runs in the background after detaching/kill-server – Yibo Yang Aug 11 '16 at 3:00
  • 1
    tmux kill-server works based on the $TMUX variable to talk to the background process. If it's not set or pointing elsewhere then the "lost" process is not told to die. – Stephen Harris Aug 11 '16 at 3:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.