Dash (-) in directory listing

Posted by Mazzy on Server Fault See other posts from Server Fault or by Mazzy
Published on 2012-12-12T03:52:35Z Indexed on 2012/12/12 5:06 UTC
Read the original article Hit count: 371

Filed under:

I've Googled around for this to no avail, I'm sure its just something simple but I have not been able to figure this out perhaps because searching in Google or SF for a "-" can be problematic.

I had a strange directory listing show up the other day in my git repository within Drupal. Listing my sites directory looks like this:

-sh-4.1$ ls -al
total 52
drwxr-xr-x  5 (hide) (hide)  4096 Dec  6 16:15 .
drwxr-xr-x 24 (hide) (hide)  4096 Dec 11 16:22 ..
-rw-rw-r--  1 (hide) (hide) 24271 Dec  6 15:57 –
drwxrwxr-x  4 (hide) (hide)  4096 Sep 17 11:53 all
drwxr-xr-x  3 (hide) (hide)  4096 Sep 17 11:54 default
drwxrwxr-x  8 (hide) (hide)  4096 Dec 11 17:40 .git
-rw-rw-r--  1 (hide) (hide)   476 Sep 17 11:53 .gitignore
-rw-rw-r--  1 (hide) (hide)    81 Sep 17 11:53 README.md

This "-" file cannot be opened and does not appear to be a symlink, although when I execute "cd -" I get this:

-sh-4.1$ cd -
/home/sites/dev1.(hide).com

That is coincidentally or not the users home directory, and the site's root directory. The other strange this is this entry does not show up for any other user browsing this same directory. Nor does it show up for other users period in their Git directories. The entry cannot be removed via RM.

Running Centos 6.2 by the way...

© Server Fault or respective owner

Related posts about directory-listing