title: p4 CLI: How to find new files not yet "added" to perforce control
body: <p>I have looked at different ways of doing this using diff.  The first option I tried is:</p>
  
  <pre><code>p4 diff -sa
  </code></pre>
  
  <blockquote>
    <p>Opened files that are different from the revision in the depot, or missing.</p>
  </blockquote>
  
  <p>Initially I figured that this was a file with write permission bit set that did not exist in the depot.  However, I have since learned p4 doesn't use mode bits to track opened/unopened states as I first thought.</p>
  
  <p>Next I figured this option would work:</p>
  
  <pre><code>p4 diff -sl
  </code></pre>
  
  <blockquote>
    <p>Every unopened file, along with the status of 'same', 'diff' or 'missin' as compared to its revision in the depot.</p>
  </blockquote>
  
  <p>This would be okay, except "unopened" is not inclusive of "untracked" files.  Although, when I ran this, it produced something quite different that contradicts the documentation; it output pretty much everything that was tracked, but also output everything that wasn't tracked, but flagged them as 'same'.  Maybe this means that it hasn't been added and doesn't exist in the depot, so the client is the same as the depot...?  In my SVN biased opinion, a rather pointless option.</p>
  
  <p>Then there is the 'opened' option.  But this does exactly that.  It lists all the files in the depot that have been opened on the client; so not the files modified on the client not yet added.</p>
  
  <p>So is there an option I am missing somewhere, that will provide some valuable answer, like SVN and CVS are able to do with one simple command?</p>
  
  <pre><code>$ svn status
  A added
  M modified
  R deleted
  ? untracked
  L locked
  C conflict
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>$ cvs -q up -Pd
  </code></pre>