CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 31 Jul 2025 04:36:15 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090210085442
location: https://web.archive.org/web/20090210085442/https://examples.oreilly.com/upt2/split/sl
server-timing: captures_list;dur=0.598531, exclusion.robots;dur=0.022953, exclusion.robots.policy;dur=0.011353, esindex;dur=0.010276, cdx.remote;dur=15.845589, LoadShardBlock;dur=182.504172, PetaboxLoader3.datanode;dur=143.247083
x-app-server: wwwb-app210
x-ts: 302
x-tr: 224
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app210; 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, 31 Jul 2025 04:36:15 GMT
content-type: text/plain
content-length: 1905
x-archive-orig-date: Tue, 10 Feb 2009 08:54:42 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Mon, 31 Mar 2008 18:10:12 GMT
x-archive-orig-etag: "12457c4-771-90194900"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 1905
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: Tue, 10 Feb 2009 08:54:42 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 19 Aug 2002 08:47:02 GMT", ; rel="prev memento"; datetime="Sun, 18 May 2008 20:47:33 GMT", ; rel="memento"; datetime="Tue, 10 Feb 2009 08:54:42 GMT", ; rel="next memento"; datetime="Wed, 30 Sep 2015 16:41:18 GMT", ; rel="last memento"; datetime="Fri, 25 Mar 2016 02:58:39 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_8_20090210075601_crawl103-c/52_8_20090210085419_crawl100.arc.gz
server-timing: captures_list;dur=0.668710, exclusion.robots;dur=0.026960, exclusion.robots.policy;dur=0.011628, esindex;dur=0.012102, cdx.remote;dur=8.017786, LoadShardBlock;dur=197.352080, PetaboxLoader3.datanode;dur=126.940740, PetaboxLoader3.resolve;dur=144.003928, load_resource;dur=129.744835
x-app-server: wwwb-app210
x-ts: 200
x-tr: 362
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
#!/usr/bin/perl
# Usage: sl [filenames]
die "Usage: sl [filenames]\n" unless @ARGV;
# Preliminaries.
$| = 1;
chop($cwd = `pwd`) || die "Can't find current directory: $!\n"
if @ARGV > 1;
print "\n";
# Do each name.
foreach $name (@ARGV) {
@indent = ();
print "$name:\n";
@path = split(m;/;, $name);
# Make an absolute path relative to /.
if (@path && $path[0] eq '') {
chdir '/';
shift @path;
print '/';
$indent = 1;
}
# Now follow the subdirectories and links.
while (@path) {
$elem = shift @path;
$new = readlink($elem);
if (defined $new) { # A symbolic link.
print "$elem \-> $new\n";
$new =~ s!^\./!!;
# Prepend symbolic link to rest of path.
unshift(@path,split(m;/;, $new));
# Deal with special cases.
if (@path && $path[0] eq '') {
# Absolute path starts over.
chdir '/';
shift @path;
print '/';
$indent = 1;
@indents = ();
next;
}
# Back up the tree as necessary.
while (@indents && $path[0] eq '..') {
$indent = pop(@indents);
chdir '..'
|| die "\n\nCan't cd to ..: $!\n";
shift @path;
}
print "\t" x ($indent / 8), ' ' x ($indent % 8);
}
else { # An ordinary directory.
print $elem;
push(@indents,$indent);
$indent += length($elem) + 1;
if (@path) {
print '/';
chdir $elem
|| die "\n\nCan't cd to $elem: $!\n";
}
}
}
print "\n\n";
$indent = 0;
chdir $cwd || die "Can't cd back: $!\n" if $cwd ne '';
}