[Linux-disciples] Moving files

Adam Rosi-Kessel adam at rosi-kessel.org
Mon Jun 5 13:16:39 EDT 2006


Stephen R Laniel wrote:
> On Mon, Jun 05, 2006 at 10:34:47AM -0500, Karl Sokol wrote:
>> I want to move all of the files on my computer that have exactly 4 letters and
>> a .mp3 extension, to a single folder.   Is this possible.
> Yes. You'll do something like this:
> find . -iregex '^[[:alnum:]\{4\}\.mp3$' -depth mv '{}' [newfolder] \;

That seems to be missing an -exec, should be:

find . -iregex '^[[:alnum:]\{4\}\.mp3$' -depth -exec mv '{}' [newfolder] \;

Also, I don't think the -depth option has any significance here.


More information about the Linux-disciples mailing list