home *** CD-ROM | disk | FTP | other *** search
- head 1.4;
- access;
- symbols
- VER_0_3:1.4
- VER_0_2:1.3;
- locks; strict;
- comment @# @;
-
-
- 1.4
- date 95.03.24.11.43.35; author coulter; state Exp;
- branches;
- next 1.3;
-
- 1.3
- date 95.03.10.02.42.22; author coulter; state Exp;
- branches;
- next 1.2;
-
- 1.2
- date 95.02.19.16.06.41; author coulter; state Exp;
- branches;
- next 1.1;
-
- 1.1
- date 95.02.18.12.29.58; author coulter; state Exp;
- branches;
- next ;
-
-
- desc
- @Script to find link files below a given directory.
- @
-
-
- 1.4
- log
- @Checkin version for 0.3 distribution.
- @
- text
- @#! /bin/ksh
- USAGE='USAGE: find_links [ ROOT_DIR ]
- Print to stdout lines with FILE_PATH and LINK for every
- link on the hard disk.
- '
- # (C) Copyright 1995 by Michael Coulter. All rights reserved.
-
- # Process parameters
-
- if [ $# -gt 1 ]
- then
- echo "$USAGE" >&2
- echo "Too many arguments." >&2
- exti 1
- fi
- ROOT_DIR="/"
- if [ $# -gt 0 ]
- then
- ROOT_DIR="$1"; shift
- fi
- if [ ! -d "$ROOT_DIR" ]
- then
- echo "$USAGE" >&2
- echo "$ROOT_DIR is not a directory" >&2
- exti 1
- fi
-
- # Do find
-
- find ${ROOT_DIR} \
- -path '/mnt/*' -prune \
- -o -path '/cdmnt/*' -prune \
- -o -path '/tmp/*' -prune \
- -o -path '/proc/*' -prune \
- -o -path '/var/tmp/*' -prune \
- -o -path '/var/utmp/*' -prune \
- -o -type l
- @
-
-
- 1.3
- log
- @Checkin files modified to make version 0.2
- @
- text
- @d6 1
- @
-
-
- 1.2
- log
- @Checkpoint version 0.1
- @
- text
- @d31 1
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d2 1
- a2 1
- USAGE='USAGE: find_links
- d7 29
- a35 8
- .do find / \
- -path '/mnt/*' -prune \
- -o -path '/tmp/*' -prune \
- -o -path '/proc/*' -prune \
- -o -path '/system_cd/*' -prune \
- -o -path '/var/tmp/*' -prune \
- -o -path '/var/utmp/*' -prune \
- -o -type l
- @
-