0

I was running the find command looking for some config files and this is exactly what it outputted:

 ./log4j.xml
 ./log4j2-test.xml
 ./proxyserver/src/main/resources/log4j.xml
 ./proxyserver/target/classes/log4j.xml
 ./proxyui/src/main/resources/log4j.xml
 \./proxyui/src/test/resources/log4j.xml
 ./proxyui/target/classes/log4j.xml
 ./proxyui/target/odo/WEB-INF/classes/log4j.xml
 ./proxyui/target/test-classes/log4j.xml

Why does the sixth one down the way that it is? I tried opening the file

\./proxyui/src/test/resources/log4j.xml

and I believe it is the same file as the one that is at

./proxyui/src/test/resources/log4j.xml

So why is that backslash there at the front?

  • I think it´s because the log4j.xml is found as main and test. The test is escaped (disabled), because your main is activated. [But only guessing ;)] – user356751 Aug 14 '14 at 18:56
  • Peculiar. Try piping the output to od -t x1z -w24 and locate the name and backslash there... (od will display both a hex and an ascii type listing for what you pipe into it) – Hannu Aug 14 '14 at 20:43
  • I'm on Mac OSX and its 'od' command doesn't support the -t x1z option. Anyway, I manually inspected the output of the same find command and the backslash is gone...so maybe it was just a bug in find? – 11th Hour Worker Aug 14 '14 at 20:47
  • My guess is that you accidentally bumped the \ key while find was running, and your \ echoed on the screen in the middle of find's output. – G-Man Says 'Reinstate Monica' Aug 14 '14 at 22:52
1

I'm accepting G-Man's comment as the answer:

"My guess is that you accidentally bumped the \ key while find was running, and your \ echoed on the screen in the middle of find's output."

The other possibility that it's a bug in find or some paths have a \ in front seems much more unlikely

| improve this answer | |
  • Either let him rewrite his comment as an answer and then accept it, or accept your own answer. As it is now, the question is left with no accepted answer. :) Cheers! – Filip Vondrášek Aug 15 '14 at 1:19

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.