#! /bin/sh
#
# |-----------------------------------------------------------|
# | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
# | All Rights Reserved                                       |
# |-----------------------------------------------------------|
# |          Restricted Rights Legend                         |
# | Use, duplication, or disclosure by the Government is      |
# | subject to restrictions as set forth in                   |
# | subparagraph (c)(1)(ii) of the Rights in Technical        |
# | Data and Computer Software Clause of DFARS 252.227-7013.  |
# |         MIPS Computer Systems, Inc.                       |
# |         950 DeGuigne Avenue                               |
# |         Sunnyvale, California 94088-3650, USA             |
# |-----------------------------------------------------------|
#
# $Header: oldfile,v 1.6.2.1 92/06/24 13:47:47 marker Exp $
#	Look for files older than so-many days.

#!	chmod +x ${file}

accessed=accessed
a=a
u=u
case "$1" in
-m )	# modify days
	accessed=modified
	a=m
	u=
	shift
	;;
-c )	# inode modified
	accessed='inode modified'
	a=c
	u=c
	shift
esac
if [ $# = 0  -o  $# -gt 2 ]
then
	echo >&2 "Usage:  $0 [ -m|c ] directory [ age in days ] 
For more detail type:	prtdoc devcmd.$0"
	exit 1
fi
if [ "$2" = '' ]
then
	d=90
else
	d=$2
fi
echo "files not ${accessed} in the last ${d} days under directory $1"
cd $1
find . -${a}time +${d} -print  |
	sort  |
	xargs ls -dls${u}  |
	sed 's;\./;;'
