Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If your photos are in <code>/path/to/photos/</code> and its subdirectories, and you want to move then in <code>/path/to/master/</code>, and you want to select them by extension <code>.jpg</code>, <code>.JPG</code>, <code>.png</code>, <code>.PNG</code>, etc.:</p> <pre><code>find /path/to/photos \( -iname '*.jpg' -o -iname '*.png' \) -type f -exec mv -nv -t '/path/to/master' -- {} + </code></pre> <p>If you don't want to filter by extension, and just move everything (i.e., all the <em>files</em>):</p> <pre><code>find /path/to/photos -type f -exec mv -nv -t '/path/to/master' -- {} + </code></pre> <p>The <code>-n</code> option so as to not overwrite existing files (optional if you don't care) and <code>-v</code> option so that <code>mv</code> shows what it's doing (very optional).</p> <p>The <code>-t</code> option to <code>mv</code> is to specify the target directory, so that we can stack all the files to be moved at the end of the command (see the <code>+</code> delimiter of <code>-exec</code>). If your <code>mv</code> doesn't support <code>-t</code>:</p> <pre><code>find /path/to/photos \( -iname '*.jpg' -o -iname '*.png' \) -type f -exec mv -nv -- {} '/path/to/master' \; </code></pre> <p>but this will be less efficient, as one instance of <code>mv</code> will be created for each file.</p> <p>Btw, this <em>moves</em> the files, it doesn't <em>copy</em> them.</p> <p><strong>Remarks.</strong></p> <ul> <li>The directory <code>/path/to/master</code> must already exist (it will not be created by this command).</li> <li>Make sure the directory <code>/path/to/master</code> <em>is not</em> in <code>/path/to/photos</code>. It would make the thing awkward!</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload