[Linux-disciples] Moving files
Karl Sokol
revkarl at gmail.com
Mon Jun 5 20:16:57 EDT 2006
Thanks for your help. I am learning more about find, but it hasn't helped
yet.
church at ubuntu:/share/new$ ls | tail
ZHRM.mp3
Zilla - Untitled Track 12.mp3
ZMLB.mp3
ZOYP.mp3
ZQVM.mp3
ZVWQ.wav
ZYCW.mp3
ZZAW.mp3
ZZFN.mp3
ZZ Top - Tush.mp3
church at ubuntu:/share/new$ find . -type f -iregex '^....\.mp3$' -exec mv '{}'
/home/church/Desktop/new/ ';'
church at ubuntu:/share/new$
For that matter, removing everything from '-exec' on doesn't find
anything. I have tried many variations, but with no success.
In the grand scheme of things, it is not a big deal though. I was just
trying to avoid cluttered playlists etc.
As for going back to itunes, something went drastically wrong and it shows
that she has no songs. So, we mounted it as a drive and copied the songs
over to my computer.
On 6/5/06, Stephen R Laniel <steve at laniels.org> wrote:
>
> On Mon, Jun 05, 2006 at 01:16:39PM -0400, Adam Rosi-Kessel wrote:
> > Also, I don't think the -depth option has any significance here.
>
> Come to think of it, when I wrote that I was thinking that
> we might be moving some directories, in which case -depth
> has some value. But if we're just moving files, then it
> doesn't.
>
> > I would go with the simpler:
> >
> > find . -type f -iregex '^....\.mp3$' -exec mv '{}' [newfolder] ';'
> >
> > which I think in all imaginable cases does the same thing.
>
> If you don't want to move files whose names contain dashes
> or underscores, then the [[:alnum:]] one works better.
>
> --
> Stephen R. Laniel
> steve at laniels.org
> Cell: +(617) 308-5571
> http://laniels.org/
> PGP key: http://laniels.org/slaniel.key
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
>
> iD8DBQFEhGn+Ha1lzVGot+YRAuqiAJ98kAFWicGdcxFlTWZ2BbPc6DzsSQCgiQxA
> +2JORHGgWzb1pdkrPmR//FM=
> =cqSh
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>
>
>
--
Grace and Peace,
Rev. Karl Sokol
Franklin Grove UMC
223 N. Middle St.
Franklin Grove, IL 61031
*happiness is when
what you think,
what you say,
and what you do
are in harmony.*
-GANDHI-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20060605/b8cc9d2e/attachment.htm
More information about the Linux-disciples
mailing list