Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my /var/log directory, I've got these three files (extracted from ls -l)

 size  filename
205198 ntp.log
  2446 ntp.log #
  4096 ntp.log -

The file "ntp.log -" is highlighted in blue.

What do the # and - after the names mean??

share|improve this question

migrated from Apr 28 '10 at 8:59

This question came from our site for professional and enthusiast programmers.

is that an ls output? – klez Apr 28 '10 at 8:55
Yes, it's from ls -l – John Apr 28 '10 at 8:58
up vote 5 down vote accepted

Smells fishy to me. Those are not characters that mean anything after the filename, which leads me to believe that they're actually part of the filename, and the entry in blue is a directory. Use ls -lQF to verify. You should see something like this:

 size  filename
205198 "ntp.log"
  2446 "ntp.log #"
  4096 "ntp.log -"/
share|improve this answer

What is there in other files, if both are files. Are these similar to ntp.log

Also, You can determine the file type using 'file'

#file <filename>
share|improve this answer

Turns out i can't pick a correct answer as this was migrated from stack overflow.

Ignacio Vazquez-Abrams: You were correct, "ntp.log #" was a file and "ntp.log -" was a directory. I'm not sure about "ntp.log -", but "ntp.log #" was created in my dodgy rsyslog conf file where I tried to add a comment at the end of a file path

share|improve this answer
just visit the accounts tab to associate and you can own your question. – Jeff Atwood Apr 28 '10 at 10:44

You must log in to answer this question.

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