Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
    
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
add comment

migrated from stackoverflow.com Apr 28 '10 at 8:59

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

3 Answers

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
add comment

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
add comment

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
add comment

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.