You can find the file:but to process it properly you will need to use the -print0 option, and something like -0 (number zero) to xargs. For example:would pass all the filenames found in the arguments to xyz.Main, even with spaces or control characters in the names.
posted 11 years ago
Thanks Carey Evans for reply.
But i want different.
suppose i have a directory 'dirName' in linux. in that there are two files with today's last modified timestamp.
dirName | | ---> new FileName1.txt ---> old File 100.txt
folder and files are as shown above.
and to get these files according to there last modifield timestamp i have written a small shell script as below:
for file in "$( /usr/bin/find /usr/dirName -type f -mtime 0 )" do cp -rf $file /home/BackupDirName done
so i execute above script i got following errors:
cp: cannot stat `/usr/dirName/new': No such file or directory