Originally Posted by rambolinuxbuddy
you can use this command:-
ubuntu$ cp $(find . -name "*flac") direcory/you/want/to/copy/
No, do not
use that. Never use a substitution pattern to insert lines of text from a file or command into another command. Shell word-splitting will break up any entries with whitespace in their names, and globbing characters might possibly expand, and you'll end up with errors and possibly worse.
It's basically the same problem as this
. Unless you can tell your command to operate on filenames directly, you really need to use a while+read
loop or similar.
How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
How can I find and deal with file names containing newlines, spaces or both?