I have text files in certain sub folders like home/andhra1/node1/*.txt files and home/andhra1/noden/*.txt and home/andhra2/node1/*.txt.I have to all files from different sub directories to one directory. below is the shell script which i wrotefromPath='source path'echo $fromPathfile='destination path/*.pdf'echo $filetoPath='destination path'echo $toPathfor i in $file;do  filePath=$i  if [ -e $filePath ];  then    echo $filePath    yes | cp -rf $filePath $toPath  else    echo 'no files'  fidone
How to move all files with a certain file extension from subdirectories to a single directory
shell script;files