Copy files for particular dates

Hi,

I need to copy particular date files from one directory to another.

For example,
I have thousands of files in
/home/usr
From this I need to copy only particular date files (each date contains thousand number of files) to some directory of another server.

Could anyone please help me on to just copying this particular date files from one directory to another directory?

Please help me on this guys.

Thanks in advance .

Do your file names contain the date that you'll use to select them, or are you needing to use the last modification time of the file as your selection criteria? The answer to this question will determine the method needed to find and copy the files. If the filenames contain the date you wish to use, please post a sample of the names.

yeah I need particular date like Feb 15 and Feb 16 files.

Thank you

Assuming by your response that the file names do NOT contain the date, and thus you need to base your selection on the last modification time, this would be one way. Create a start/end marker with timestamps that bound your desired selection criteria, and then run a find that lists all files that fall within that range.

#!/usr/bin/env ksh

touch -t 201202150000.00 marker.start    # bounds Feb 15 2012 midnight - Feb 16 23:59:59
touch -t 201202162359.59 marker.end

# cd to desired directory if needed, or enter full path instead of '.' in the find command 
find . -type f -newer marker.start  ! -newer marker.end   |while read file
do
    if [[ ${file%%.*} != "marker" ]]    # skip markers (assumes no files you want to copy start with marker.
    then
        ls -al "$file"            # demonstration/verification 
        # remove the ls command and replace with your copy command 
    fi
done
rm marker.start marker.end