title: How to get a list of non-directory files in a directory in Aix or Unix?
body: <p>I want to get a list of non-directory files in a directory. The <code>find</code> command is working, but the <code>maxdepth 1</code> option is not working, maybe because it is not supported on Aix.</p>
  
  <p>This command:</p>
  
  <pre><code>find . -maxdepth 1 -type f  
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>find: bad option -maxdepth
  </code></pre>
  
  <p>I used this command:</p>
  
  <pre><code>ls -l | grep ^- | awk '{print $9}'
  </code></pre>
  
  <p>but this does not work if the file name contains a space. Is there any way to solve this?</p>