Bash Script to move Files

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

 



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

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux