Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 -> XXX@YYY.com.2980: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.

share|improve this question
    
This one starts with . and not with a #. –  ott-- Jan 16 '13 at 19:34
    
Thanks @ott. I updated the post title. –  user815423426 Jan 16 '13 at 19:36
    
In most unix/linux filesystems, any character except / and NUL is allowed in a filename/dirname. Someone made up that name. –  ott-- Jan 16 '13 at 19:41

1 Answer 1

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 user@host.emacsPID:timestamp.

So, in your case [.#perl.org -> XXX@YYY.com.2980: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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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