1. Piping results of a 'find' command to a 'mv' command...
Is there a way to do the following without scripting:
Pipe the contents of a 'find' command to a 'mv' command, so that the
results of 'find', example:
find / -iname '*simpsons*' 2>>/dev/null
/home/shawn/downloads/simpsons1.mpg
/home/shawn/simpsons/Halloween Special IX.mpg
/home/shawn/unsorted/simpsons02.mpg
are all moved to a folder of my choosing:
Something like:
find / -iname '*simpsons*' 2>>/dev/null | mv /home/shawn/tv/simpsons
Can anyone help? If scripting is required, I don't mind, but I
thought that if there was an easy way, I'd like to use it.
If scripting is required, is there an easy way to do it just by
creating a script containing a list of commands and running it after
chmod +x? Or would I have to do something with Perl in order to loop
through the results of the 'find'?
I know a little Perl, but if there is some other type of scripting
preferred for this type of thing, please tell me the name of it and
where I might find a little documentation.
Thank you for any help you can give. And please, even if the answer
can be derived from a particular command, do not simply type 'man
commandName'. A little description/advice would be very nice.
Shawn
2. help newbie: Network Card SetUp, Problem with IRQ?
3. usage of 'foreach' and 'find' commands
4. Masquerading RedHat Linux 7.1
5. Need to find info on the 'FIND' command
6. Root exploit?
7. Usind 'find' command to find certain text within a file
8. nmbd not running in samba
9. What happened to 'chsh' (change shell) command?
10. 'Find' 'Updatedb' or find database replacement for Solaris 2.X?
11. How to hide from 'who', 'finger', 'ps' commands?
12. Help with 'user', 'w', 'who' commands
13. Kernel Compile Problems - 'as86 command not found'