Is there any command to check the each and every file copied recursively or not?
good moring!
pls give the suggetions for me.
I am copying the files recursively from one dir to another dir.
Here I am trying as below:
But here we get the each file recursively using find command.
If this file copied in installation path ,i am getting two files as
ex :
fname1=aaa/bbb/a.txt
installPath=/home/all/
then I am getting /home/all/aaa/bbb/a.txt , /home/all/a.txt
for fname in $folders
do
if [ -d "./$fname" ]
then
files=`find "$fname"`
for fname1 in $files
do
cp -r --preserve=mode $fname1 "${installPath}"/.
if [ $? -eq 0 ]
then
echo "Copied the file: "${installPath}""${fname1}"" >> "${installPath}"/SRMsetuplog.log
else
echo "Could not copy the file:"${installPath}""${fname1}"" >> "${installPath}"/SRMsetuplog.log
fi
done
fi
done
Is there any command to check the each and every file copied or not?
Pls give the suggetions for me
Thanq,
Nagendra
|