CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 07 Aug 2025 15:37:11 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20080518203057
location: https://web.archive.org/web/20080518203057/https://examples.oreilly.com/upt2/split/findcmd
server-timing: captures_list;dur=0.567924, exclusion.robots;dur=0.022287, exclusion.robots.policy;dur=0.010276, esindex;dur=0.010233, cdx.remote;dur=282.932715, LoadShardBlock;dur=490.214288, PetaboxLoader3.datanode;dur=124.931460, PetaboxLoader3.resolve;dur=296.427887
x-app-server: wwwb-app215
x-ts: 302
x-tr: 797
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app215; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 07 Aug 2025 15:37:13 GMT
content-type: text/plain
content-length: 1544
x-archive-orig-date: Sun, 18 May 2008 20:30:54 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Mon, 31 Mar 2008 18:10:12 GMT
x-archive-orig-etag: "54c430-608-90194900"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 1544
x-archive-orig-connection: close
cache-control: max-age=1800
x-archive-guessed-content-type: text/plain
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 18 May 2008 20:30:57 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 19 Jun 2002 01:56:09 GMT", ; rel="prev memento"; datetime="Tue, 16 Oct 2007 16:13:57 GMT", ; rel="memento"; datetime="Sun, 18 May 2008 20:30:57 GMT", ; rel="next memento"; datetime="Tue, 10 Feb 2009 09:07:35 GMT", ; rel="last memento"; datetime="Fri, 25 Mar 2016 03:19:22 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_3_20080518193113_crawl107-c/52_3_20080518203051_crawl100.arc.gz
server-timing: captures_list;dur=0.789290, exclusion.robots;dur=0.028361, exclusion.robots.policy;dur=0.012051, esindex;dur=0.012735, cdx.remote;dur=85.003380, LoadShardBlock;dur=1192.192568, PetaboxLoader3.resolve;dur=1233.272297, PetaboxLoader3.datanode;dur=306.377824, load_resource;dur=392.931011
x-app-server: wwwb-app215
x-ts: 200
x-tr: 1705
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
accept-ranges: bytes
#! /bin/sh
### findcmd - hunt through PATH for all command names containing string
### Usage: findcmd string
#
# WOULD BE NICE IF IT USED ONE OF THE "APPROXIMATE MATCH" GREPS
# THAT CAME ACROSS THE NET A WHILE AGO...
# ls -l OPTION TO SHOW JUST OWNER NAME, NOT GROUP. ON SYSTEM V, USE -dlo:
lsopt=-dl
case $# in
1) ;;
*) echo "Usage: `basename $0` string" 1>&2; exit 1 ;;
esac
# REPLACE NULL FIELD IN $PATH WITH A .:
fixpath="`echo $PATH | sed \
-e 's/^:/.:/' \
-e 's/::/:.:/g' \
-e 's/:$/:./'`"
# WE NEED TO PICK FILES EXECUTABLE BY OTHER OR GROUP OR OWNER...
# DEPENDING ON WHO USER IS AND ETC...
# THIS sed STUFF DOESN'T REALLY CUT IT...
# IT READS THE INPUT LINES, WHICH LOOK LIKE THIS:
# -rwxr-xr-x 1 jdpeek 577 Aug 21 07:09 /xxx/yyy/findcmd
# DELETES ALL LINES WITH "$1" not found; ALSO ZAPS DIRECTORIES.
# FOR OTHER LINES THAT LOOK EXECUTABLE, IT BRANCHES TO :printit,
# WHICH STRIPS OFF COLUMNS 1-44 (LEAVING THE PATHNAME) AND STRIPS
# OFF ANY SYMLINK INFO (-> TARGET) THEN IT PRINTS.
# (WHAT SHOULD IT DO WITH SYMLINKS?)
IFS=":$IFS"
thisdir="`/bin/pwd`"
for dir in $fixpath
do
case "$dir" in
.) cd "$thisdir" || exit 1 ;;
*) cd "$dir" || exit 1 ;;
esac
# USING ls -dl $dir/*${1}* MIGHT BOMB WITH Arguments too long...
# SO USE sed TO CHANGE " ./" IN THE ls OUTPUT INTO " $dir/":
ls $lsopt ./*${1}* 2>&1 | sed "s@ \./@ $dir/@"
done |
sed -n "
/not found$/d
/^d/d
/^...[sx]......... $USER/b printit
/^......[sx]..[sx]/b printit
b
:printit
s/^.............................................//
s/ -> .*$//
p"