home *** CD-ROM | disk | FTP | other *** search
- :
- # top - list the newest entries in the directory
- # by default, list only the latest 10 entries
- # the number of entries can be specified by the 1st argument
- #
- # written 7/95 by Ronald Joe Record (rr@sco.com)
- #
- # typically, i just type "top" to get the latest 10 entries in the current dir.
- # frequently i type "top 20" or "top 20 /tmp". You get the idea.
- #
-
- HEAD="head -11"
- ARGS=-l
- DIR=.
-
- while case "$1" in
- "") break
- ;;
- -*) ARGS=$1
- ;;
- [0-9]*) HEAD="head -`expr $1 + 1`"
- ;;
- *) DIR=$1
- ;;
- esac
- do
- shift
- done
-
- ls ${ARGS}t $DIR | $HEAD
-