Article Figure 1 Figure 2 Listing 1 Listing 2
Listing 3 Listing 4 Listing 5 Listing 6 Listing 7
Listing 8 Listing 9 Listing 10 Listing 11 Listing 12
Listing 13 Listing 14 may94.tar

Listing 8: prog4a

:
#######################################################
# prog4a - list files that have not been accessed for a
# year.
#
# This could also be used to find date ranges.  See also
# yearago.sh.
#
# atime - Time when file data was last accessed.
#         Changed by the following system calls:
#
#     creat, mknod, pipe, utime, and read.
#

lyear=`yearago.sh`
echo "year ago date = $lyear"

find / -type f -print |
stat -aAn - |

awk '{
# day month dayofmonth time year date_number name

if ( $6 <= yearold ) {
$6=""
print
}
}' yearold=$lyear