3

I have a symlink in one of my directories that has the following name:

lrwxrwxrwx  1 XXXX ZZZ   37 Jan 15 18:18 .#perl.org -> [email protected]:1344441539

I am wondering what this symlink represents and which program/action created it.

By the way, I have a file in this directory called perl.org that I have been working on for the last few days. I connect with ssh -Y and then run emacs to edit this and other files.

2
  • This one starts with . and not with a #.
    – ott--
    Commented Jan 16, 2013 at 19:34
  • In most unix/linux filesystems, any character except / and NUL is allowed in a filename/dirname. Someone made up that name.
    – ott--
    Commented Jan 16, 2013 at 19:41

1 Answer 1

4

Emacs creates these files as "lock files".

From Emacs help section "22.3.4 Protection against Simultaneous Editing"

When you make the first modification in an Emacs buffer that is visiting a file, Emacs records that the file is "locked" by you. (It does this by creating a specially-named symbolic link in the same directory.) Emacs removes the lock when you save the changes. The idea is that the file is locked whenever an Emacs buffer visiting it has unsaved changes.

In that section it does not say how the files are named, but I have seen files created by Emacs with the exact pattern of your file. I.e. a symlink named .#(original filename) that is a symlink to [email protected]:timestamp.

So, in your case [.#perl.org -> [email protected]:1344441539] the file perl.org has been edited (and not saved) by user XXX at host YYY.com using an emacs session with PID 2980 at time 1344441539=Wed Aug 8 17:58:59 CEST 2012.

Hint: use date -d@1344441539 to convert the timestamp to human-readable form.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .