[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



find / -name "*.jpg" -exec mv /mnt/mymachine/ {} \;


On Thu, 2004-05-06 at 17:06, Nathan J. Underwood wrote:

> Ok, this should be an easy one, but I can't seem to remember how to do 
> it.  I have a seriously dorked up Win98 workstation (won't boot) that a 
> friend has given me to 'turn into linux'.  Catch is, though, he wants to 
> keep all of his pictures (*.jpg, *.gif), movies (*.mpg), and documents 
> (*.doc, *.xls).  I've done it before (thanks to the help of someone 
> here, if I'm not terribly mistaken), and am currently perusing through 
> the archives trying to find it, but need a script that'll do something 
> like the following:
> 
> find all of the .jpg files, and move them to /mnt/mymachine (samba mount)
> find all of the .gif files, and move them to /mnt/mymachine (samba mount)
> etc.
> 
> The box is currently booted with knoppix, and I've mounted a directory 
> on my box to copy the files to.  Now, I've just gotta find a relatively 
> painless way to move 9,000+ files.
> 
> As a testament to how bad I am at shell scripting, I'm going to put what 
> I have so far (tab #2 in my browser is at linuxdoc.org trying to get all 
> the parameters right for find, exec, and copy).  As always, any help 
> would be greatly appreciated.
> 
> find *.jpg -exec copy $1 /backup
> 
> 
> ______________________________________________________________________
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
-------------- next part --------------
An HTML attachment was scrubbed...



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00237" href="msg00237.html">[ale] Shell Scripting -&gt; find files *.&lt;ext&gt; and move them to	/backup</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00229" href="msg00229.html">[ale] Shell Scripting -&gt; find files *.&lt;ext&gt; and move them to /backup</a></strong>
<ul><li><em>From:</em> ale1 at cybertechcafe.net (Nathan J. Underwood)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00233.html">[ale] Re: Suse 9.1 Pro posted to tux.org, please be considerate!!</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00235.html">[ale] Quiet</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00229.html">[ale] Shell Scripting -&gt; find files *.&lt;ext&gt; and move them to /backup</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00237.html">[ale] Shell Scripting -&gt; find files *.&lt;ext&gt; and move them to	/backup</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00234"><strong>Date</strong></a></li>
<li><a href="threads.html#00234"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>