allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) (02/26/89)
Posting-number: Volume 6, Issue 41 Submitted-by: cmanis@petro.UUCP (Cliff Manis) Archive-name: findname #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # README # findname # fullpath # This archive created: Wed Feb 8 16:02:10 1989 # By: cmanis@csoftec.UUCP (CompSofTech Co., POB 33937, San Antonio, TX 78265) export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'README' then echo shar: "will not over-write existing file 'README'" else cat << \SHAR_EOF > 'README' - Is your system always slow when trying to 'find' the name of a file ? Well, sometimes the most simple of scripts sure make life a lot easier. These two small scripts were written is self-defense, because the slow speed of the system I 'was using'. I believe these scripts can speed-up the 'find' time of any UNIX/Xenix system. ---- fullpath: Script to find the fullpath of all files on system, and store all those filenames in /usr/local/bin/fullpath.names findname: Script to locate any filename on system, pipe it through 'more' in case there are many for one screen. Since I run the crontabs/root entry at 3,6,10,15,18 hours, the system filenames are always in touch with reality. I have put these scripts on about 10 systems and the 'administrators' use it all the time. Just - Keeping it simple, sometimes is the best way. Cliff Manis, UUCP: cmanis!csoftec SHAR_EOF fi if test -f 'findname' then echo shar: "will not over-write existing file 'findname'" else cat << \SHAR_EOF > 'findname' # /usr/local/findname # # Easily Find name of any file on system, and must # be used in conjuction with 'fullpath' script # By: Cliff Manis, 13 February 1988 # # UUCP: cmanis@csoftec # grep $1 /usr/local/bin/fullpath.names | more SHAR_EOF fi if test -f 'fullpath' then echo shar: "will not over-write existing file 'fullpath'" else cat << \SHAR_EOF > 'fullpath' # /usr/local/bin/fullpath # # Get the full path of all files on system, this script # was written to work with 'findname' script, to easily # find the name of any file on system without using # 'find', and it is so much faster. This script should # be put in crontabs/root to have it execute several # times a day. # # ver 1.11, 13 February 1988 # # UUCP: cmanis@csoftec # cd / du -a | sed 's/.* \.//' > /usr/local/bin/fullpath.names # SHAR_EOF fi exit 0 # End of shell archive