18

When I run ls -adl .* in one of my directories, I get a file that has this listing:

lrwxrwxrwx  1 user group   43 Jul  3 16:25 .#filename.py ->  
person@computer.edu.4018:1372874769

The filename and URL-looking thing are highlighted in red. What does the l mean in lrwxrwxrwx? What kind of file is this?

  • 1
    The l mean that it is a symbolic link. are you trying to remove file or link? – Raza Jul 3 '13 at 22:49
  • What error messages are you receiving when you try to open or remove the file? – user26112 Jul 3 '13 at 23:03
  • For how to delete a symlink check superuser.com/a/9210/235569 – Braiam Jul 3 '13 at 23:06
  • I was using git rm, and got fatal: pathspec '.#plot_population.py' did not match any files. Regular rm removed the file just fine; I'll edit to correct it. – Dan Jul 3 '13 at 23:10
  • 1
    This particular file is just Emacs' way of keeping track of the fact that you have the file open and have unsaved changes. The target of the symlink isn't a real file, just a string which helps resolve in case you have multiple Emacs sessions, or the file was left behind after a crash. – tripleee Jul 4 '13 at 4:34
12

As pointed out by unxnut, .#filename.py is a special kind of file called a symbolic link. Symbolic links point to other files. Opening a symbolic link will open the file that the link points to. Removing a symbolic link with rm will remove the symbolic link itself. Your symbolic link is pointing to person@computer.edu.4018:1372874769. If that file does not exist or you do not have the appropriate permissions to read that file, you will not be able to open it in emacs.

Whether or not you can remove a file is dependent on the permissions of the directory that the file is in. You need write (w) permissions for the file's directory in order to remove the file.

6

The l in this case is a symbolic link. A symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.

You may not be able to open this file because the target may not have correct permissions for you. Please check the permissions on the target which is what you have to the right of -> (person@computer.edu.4018:1372874769 in your case).

3

The l represent symbolic link. if you are trying to remove the link then you can use rm .#filename.py to remove or if you are trying to remove the file the you need to use \since there is a : in your file name so do like this : rm person@computer.edu.4018\:1372874769

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.