Bash Script to move Files

Thom Paine painethom at gmail.com
Sat Oct 8 04:19:55 UTC 2005


I don't know how to write scripts, but I've been trying to figure this out
on my own.

I took an example I had of a temp file deleter and tried to make it work to
a file mover.

The example I was starting with was:

find -name *.tmp -exec rm -rf {} \;

And I tried to get it to seek out all my *.ogg files and dump them into a
media folder.

To prevent it from moving files repeatedly, I changed to the directory I
wanted to search and moved it to a different directory on another mount.

I can't get it to work though. I thought I could substitute rm -rf with mv
/media/oggs but that didn't seem to work.

Google hasn't found me any good hits, as I'm sure it's too hard of a thing
to search for.

Anyone on here have one already or know what I should do to make mine work?

Thanks.

--
-=/>Thom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051008/18dadb01/attachment-0001.htm>


More information about the fedora-list mailing list