thanks you very much!!
There are two problems with this solution :
1) A filename may contains the year
2) For files newer than 6 months, ls don't display the year
The following script use
find to select the files.
Code:
year=${1:-`date +%Y`}
syear=`expr $year - 1`
since_date=${syear}12312359.59
since_file=/tmp/since_${year}.$$
byear=`expr $year + 1`
before_date=${byear}01010000.00
before_file=/tmp/before_${year}.$$
touch -t $since_date $since_file
touch -t $before_date $before_file
find . ! -name . -prune ! -newer $before_file -newer $since_file | xargs ls -lad
rm -f $since_file $before_file
Run this script with the requested year as argument (default is current year).
If you want to include files in sub-directories, remove '! -name . -prune' from the options of the find command. [/SIZE][/QUOTE]