Need to copy all .jpg images in subdirectories to a specific directory
Hi All,
I have .jpg files in many subdirectories from where I need to copy all the images from all the sub directories and paste them to a specific directory. I have used `cp -rf *.jpg media/sik/` which only copies the .jpg files of the directory in which I was working. Can somebody help me.......!!!:( |
Use find.
Code:
find . -name "*.jpg" -exec cp '{}' ./media/sik/ \; |
Thanks for reply.....but sorry I forgot to tell you that I need to perform the copy task without using find command...!!!:(
|
why, do you not have find?
|
Do you have zsh?
If yes: Code:
cp **/*.jpg ./media/sik/ |
Quote:
But what of the .jpg file is in the current dir, not in a subdir? |
All times are GMT -5. The time now is 01:13 PM. |