title: What are the differences between Java's dir.listFiles() and *.nix's ls?
body: <p>I've written some java code that gets the number of files in a directory using <code>dir.listFiles().length;</code>. The command <code>ls -l | wc</code> gives me a different number. I believe that both of the commands skip hidden directories. What could be the cause for the differing numbers?  </p>