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.

Below is an example output of what I see when I run the 'ls' command on some directories in linux (this is from a tomcat/common/lib directory).

However I'm not clear on why some of the filenames are appearing inside [square brackets]

If someone could clarify this for me it would be much appreciated!

-rw-r--r-- 1 root root  1038825 Aug 30  2006 [ant].jar
-rw-r--r-- 1 root root   566376 Apr  1  2008 [commons-collections].jar
-rw-r--r-- 1 root root   107392 Aug 18  2006 [commons-dbcp].jar
-rw-r--r-- 1 root root   114374 Aug 17  2006 [commons-el].jar
-rw-r--r-- 1 root root   114374 Aug 17  2006 commons-el.jar
-rw-r--r-- 1 root root    25913 Aug 10  2006 [commons-logging-api].jar
-rw-r--r-- 1 root root   112331 Jun 21  2007 commons-modeler.jar
-rw-r--r-- 1 root root    59695 Sep 26  2006 [commons-pool].jar
-rw-r--r-- 1 root root     1201 Jul 22  2009 etag-support.jar
-rw-r--r-- 1 root root    47008 Aug 18  2006 [jaf].jar
share|improve this question

migrated from stackoverflow.com Nov 25 '10 at 18:50

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

8  
Because the filenames have square brackets in them. –  Ignacio Vazquez-Abrams Nov 25 '10 at 17:26
    
Really? Why would that be? And why would there be, for example, [commons-el].jar and commons-el.jar in the same directory? –  QuakerOat Nov 25 '10 at 17:30
    
I don't know, which is why I didn't put it as an answer. –  Ignacio Vazquez-Abrams Nov 25 '10 at 17:30
2  
Because somebody put them both there. –  Nicholas Knight Nov 25 '10 at 17:31
1  
Tomcat seems to do that from RPM installs on redhat. I have no idea why it likes to do that. –  Resorath Nov 25 '10 at 20:42

2 Answers 2

Because the filenames have square brackets in them - just like the comment from Ignacio Vazquez-Abrams says.

You may find that someone has been copying these files and used square brackets as a kind of special marker. Find out who wrote them and ask them.

share|improve this answer

"Tomcat seems to do that from RPM installs on redhat. I have no idea why it likes to do that" - Resorath.

This is the conclusion I have now come to also.

Thanks for all the suggestions

share|improve this answer
    
​Which R​P​M​?​ –  Ignacio Vazquez-Abrams Nov 25 '10 at 21:34

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.