find . -iname "*.EXT" -exec cp {} -l /DST_PATH/ \;Where EXT is extension of files you want to copy. If you want to copy all files set it to "*" . DST_PATH is destination path where you want to copy files.
You have to call this command from source path, so af first change your current directory to source by "cd" command.
If you want to copy all files from current directory but not from subdirectories here is solution with -maxdepth parameter.
find . -maxdepth 1 -iname "*.EXT" -exec cp {} -l /DST_PATH/ \;
Good luck :)
No comments:
Post a Comment