Tuesday, December 18, 2012

find and mv files in bash

I thought I would document this shell command for posterity's sake.  My bash skills are sketchy so I will need to look it up again.

I downloaded a few zip files this morning and needed to move them to a new directory.  Moving them to a new directory from the command line was trivial:


for i in $(find . -type f -newermt 2012-12-18); do cp $i /[NEW DIRECTORY PATH/; done;

No comments: