#!/bin/sh # This shell script scans the directory given as the first argument fot the # i-node number given as the second argument. # Output is to standard output. # SEE ALSO # ncheck(1M) in the System Administrator's Reference Manual # (R.J. Mathar, 02.10.90) # reply to inadequate command format if [ $# != 2 ] then echo "usage: $0 directory i-node-number" exit 1 fi # run recursively through all subdirectories and list all files # with their i-node numbers ls -il `find $1 -type d -print` | awk '/^\// {dir=$0} $1 == inode {print dir ; print $0}' inode=$2