I have multiple sub directories in which i have multiple csv file. I wanted to copy all the files alone into a different directory.
I am able to find or list the files using wildcards
find -name '*.csv'
ls /**/'*.csv'
The challenge is all the directory names and file names are having spaces and so am unable to achieve the expected result.
find . -type f -name "*.csv" -exec cp {} Folder \;
In that command, Folder
is your different directory
.
And You have to create that directory before you run this command
Before you run this command
cd
to your main directory or Home directory.mkdir Folder
)