So, I am back in town and I tried Adam's search string, but it listed only directories with 4 letters<br><br>church@ubuntu:/share/new$ find . -iregex '^.*/[^/][^/][^/][^/]$'<br>./Cake<br>./tmbg<br>church@ubuntu:/share/new$ ls | tail
<br>ZHRM.mp3<br>Zilla - Untitled Track 12.mp3<br>ZMLB.mp3<br>ZOYP.mp3<br>ZQVM.mp3<br>ZVWQ.wav<br>ZYCW.mp3<br>ZZAW.mp3<br>ZZFN.mp3<br>ZZ Top - Tush.mp3<br>church@ubuntu:/share/new$<br><br>However, to anyone who is interested, the following worked...
<br><br> find . -iregex '^.*/[^/][^/][^/][^/].mp3'<br><br>church@ubuntu:/share/new$ find . -iregex '^.*/[^/][^/][^/][^/].mp3' | tail<br>./QTAD.mp3<br>./SXIE.mp3<br>./WBEJ.mp3<br>./ZOYP.mp3<br>./JNVQ.mp3<br>./LRJF.mp3<br>./OSKP.mp3
<br>./QESD.mp3<br>./RCRV.mp3<br>./TJYH.mp3<br><br>Thanks for all of your help!<br><br><br><div><span class="gmail_quote">On 6/6/06, <b class="gmail_sendername">Adam Rosi-Kessel</b> <<a href="mailto:adam@rosi-kessel.org">
adam@rosi-kessel.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I think the reason Steve's example didn't work is the regex is applied to
<br>the whole filename including path, not just the fielname. So ^....\.mp3$<br>would match ./ab.mp3 but not ./abcd.mp3.<br><br>This would match all filenames with four letters:<br><br>find . -iregex '^.*/[^/][^/][^/][^/]$'
<br><br>For some reason, find doesn't seem to support<br><br>'^.*/[^/]{4}$' or '^.*/[^/]\{4\}$'<br><br>type syntax.<br><br>Karl Sokol wrote:<br>> I was a little sloppy with my English. I meant to say that I had<br>> trimmed everything from the -exec on out and it still came up with no
<br>> results. The 'ls' was after much finageling and<br>> /home/church/Desktop/new is still empty.<br>><br>> I see the value in having this skill in the toolbox, but I have clearly<br>> spent more time on it than I ought to have. Thank you for your help
<br>> though.<br>><br>> On 6/5/06, * Stephen R Laniel* <<a href="mailto:steve@laniels.org">steve@laniels.org</a><br>> <mailto:<a href="mailto:steve@laniels.org">steve@laniels.org</a>>> wrote:<br>>
<br>> On Mon, Jun 05, 2006 at 07:16:57PM -0500, Karl Sokol wrote:<br>> > church@ubuntu:/share/new$ find . -type f -iregex '^....\.mp3$'<br>> -exec mv '{}' /<br>> > home/church/Desktop/new/ ';'
<br>> > church@ubuntu:/share/new$<br>> ><br>> > For that matter, removing everything from '-exec' on doesn't find<br>> anything. I<br>> > have tried many variations, but with no success.
<br>><br>> That find command, with the -exec after it, wouldn't print<br>> any output to the screen; it would just move all those files<br>> to ~church/Desktop/new .<br>><br>> If you want see which files 'find' will move without
<br>> actually moving them, trim everything from -exec on. That<br>> will list the files; the -exec will move them.<br>><br>> > As for going back to itunes, something went drastically wrong and<br>
> it shows that<br>> > she has no songs. So, we mounted it as a drive and copied the<br>> songs over to my<br>> > computer.<br>><br>> It may show that she has no songs because the 'mv' command
<br>> moved them. Check /home/church/Desktop/new .<br>><br>> --<br>> Stephen R. Laniel<br>> <a href="mailto:steve@laniels.org">steve@laniels.org</a> <mailto:<a href="mailto:steve@laniels.org">
steve@laniels.org</a>><br>> Cell: +(617) 308-5571<br>> <a href="http://laniels.org/">http://laniels.org/</a><br>> PGP key: <a href="http://laniels.org/slaniel.key">http://laniels.org/slaniel.key</a>
<br>><br>><br>> -----BEGIN PGP SIGNATURE-----<br>> Version: GnuPG v1.4.2.2 (GNU/Linux)<br>><br>> iD8DBQFEhNVTHa1lzVGot+YRAoc3AJ9qtIOoFEv3VDp8cMmsbTGV7PIgfwCfTvMa<br>> ULyaKddzxoXxjRHLtCRmJ44=
<br>> =Yk1h<br>> -----END PGP SIGNATURE-----<br>><br>><br>> _______________________________________________<br>> Linux-disciples mailing list<br>> <a href="mailto:Linux-disciples@lists.bostoncoop.net">
Linux-disciples@lists.bostoncoop.net</a><br>> <mailto:<a href="mailto:Linux-disciples@lists.bostoncoop.net">Linux-disciples@lists.bostoncoop.net</a>><br>> <a href="http://lists.bostoncoop.net/mailman/listinfo/linux-disciples">
http://lists.bostoncoop.net/mailman/listinfo/linux-disciples</a><br>><br>><br>><br>><br>><br>> --<br>> Grace and Peace,<br>><br>> Rev. Karl Sokol<br>> Franklin Grove UMC<br>> 223 N. Middle St.
<br>> Franklin Grove, IL 61031<br>><br>> *happiness is when<br>> what you think,<br>> what you say,<br>> and what you do<br>> are in harmony.*<br>> -GANDHI-<br>><br>><br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> Linux-disciples mailing list<br>> <a href="mailto:Linux-disciples@lists.bostoncoop.net">Linux-disciples@lists.bostoncoop.net</a><br>> <a href="http://lists.bostoncoop.net/mailman/listinfo/linux-disciples">
http://lists.bostoncoop.net/mailman/listinfo/linux-disciples</a><br><br>_______________________________________________<br>Linux-disciples mailing list<br><a href="mailto:Linux-disciples@lists.bostoncoop.net">Linux-disciples@lists.bostoncoop.net
</a><br><a href="http://lists.bostoncoop.net/mailman/listinfo/linux-disciples">http://lists.bostoncoop.net/mailman/listinfo/linux-disciples</a><br></blockquote></div><br><br clear="all"><br>-- <br>Grace and Peace,<br><br>
Rev. Karl Sokol<br>Franklin Grove UMC<br>223 N. Middle St.<br>Franklin Grove, IL 61031<br><br>*happiness is when<br>what you think,<br>what you say,<br>and what you do<br>are in harmony.*<br>-GANDHI-