2000.11_Out of the Box-Nscache-Cache Browser.pdf
(
149 KB
)
Pobierz
106nscacheð.qxd
SOFTWARE
OUT OF THE BOX
HIDDEN
TREASURE
CHRIS PERLE
There are thousands of tools and utilities
for Linux. ”Out of the box” takes the pick of
the bunch and each month presents a
program which we consider to be indispens-
able or, perhaps, little known. Here we
examine the cache browser nscache.
After an extensive surfing session using
Netscape
, probably the most widely used web
browser under Linux, there is a wealth of files in
your personal
disk cache
. Netscape itself offers
only very limited capabilities for viewing these files.
NScache
, a browser for Netscape’s disk cache,
makes considerably more use of the filed data.
number of other open source projects. As the pro-
gram is only available in compiled form for Red Hat
Linux 6.1, we can obtain the source code and com-
pile it ourselves.
What do we need?
Old acquaintance
To be able to install NScache we need
GTK+
(ver-
sion 1.2.0 or later) and the
Berkeley Database
Library
.
With the file
nscache-0.3.tgz
on board, we can
move on to the actual installation procedure:
Stefan Ondrejicka, the author of the program, is
already known to many people through
pavuk
, a
download tool for web pages. NScache has its
homepage at
Sourceforge
, which is also home to a
tar xzf nscache-0.3.tgz
cd nscache-0.3
./configure
make
su -
(enter root-password)
make install
exit
Disk Cache:
This is temporary storage space which is created by Netscape on the
hard disk and reduces the need to constantly re-request web pages and images.
This cache is usually located in the directory
~
/.netscape/cache.
~ (Tilde):
The tilde is shorthand for the user’s home directory.
GTK+:
A library, originally written for the graphics program Gimp, which is used
to program menus, windows and dialog boxes under the X Window system.
If an error occurs at
configure
or
make
, this is often
because although the necessary libraries may be
present the corresponding developer packages are
not. Distributions separate these from the actual
libraries. The packages can be identified by the
dev
106
LINUX
MAGAZINE 2 · 2000
NScache
OUT OF THE BOX
SOFTWARE
or
devel
in their name. You need to install these
before you can move on to compiling NScache.
Once the program has been compiled successfully
using
make
, obtain root rights using the command
”
su -
” so that we can install the program below the
/usr/local
directory using
make install
. We relinquish
the root rights again with the
exit
that follows.
Berkeley Database Library:
This library provides functions that can be used to
access files organised in the University of Berkeley’s database format. This format
is widely used under Unix - the library therefore comes as standard in Linux distri-
butions.
X terminal:
Programs under the X Window system which provide a text terminal
(similar to a command prompt window under Microsoft Windows.) Widely used X
terminals include xterm, kvt and gnome-terminal.
Shell:
One of the most important parts of any Unix system - it provides a com-
mand line-controlled user interface for the system.
Protocol:
A standardised procedure which allows programs in a network to com-
municate with one another. Well-known protocols include ftp (”file transfer pro-
tocol”) and http (”hypertext transfer protocol”).
Server:
A program that provides a service for use by one or several clients. Exam-
ples of servers include X servers, FTP servers, WWW servers. The term server is also
used to describe the computer on which the program is running.
URL:
”Uniform Resource Locator”, is the unique address of a resource on the Net.
The URL also indicates the transfer protocol, e.g. http://www.linux.de/links/Distri-
butionen/ or ftp://ftp.gwdg.de/linux/mirrors/.
MIME:
Multipurpose Internet Mail Extensions, a method of indicating standard-
ised files types. Examples of MIME types include text/plain (plain text file without
formatting) and video/mpeg (mpeg-compressed video stream). MIME is used pri-
marily in mail programs and web browsers.
What is in it?
In order to test NScache open an
X terminal
and
enter:
nscache &
The ampersand sign (
&
) causes the program speci-
fied before it to run in the background. Without it
the
shell
in the X terminal would not be able to
process entries again until NScache had finished.
NScache will now output a report, showing a
tree view of the content of the disk cache (Figure 1).
This view comprises three levels:
•
Protocol
(
ftp
or
http
),
•
Server
name and
• File name on the server.
Sections of the tree can be expanded or col-
lapsed at a click of the mouse on the plus or
minus signs. Individual file entries are shown in
the disk cache with their original
URL
and their
local file name.
It is also possible to display a view which is sort-
ed on the basis of different criteria, as shown in Fig-
ure 2. The view is switched using the two tabs
Tree
view
and
Sorted view
. The URL, the size of the file
or the date when it was last accessed can be select-
ed as the criteria by which to sort the view.
specific view programs can be assigned using the
menu item
Options/Viewers setup…
(Figure 3) using
File viewer. In the example configuration the image
viewing program xv was assigned to the type
image/gif while the X terminal xterm, with a text
browser retrieved in it w3m, was assigned to the
type text/html.
In addition, an external browser (e.g.
netscape
,
lynx
or
w3m
) can be given as a
URL
viewer
. If need be, this retrieves the file concerned
directly from the Net using
View URL
. In the entry
fields of the configuration dialog
%f
stands for
the name of the local file and
%u
for the corre-
sponding URL.
Armed with this handy tool, no-one has any
excuse for trying to tidy up the Netscape disk cache
using the
rm -rf ~/.netscape/cache/
sledgehammer
method. Now you can see what’s useful and what
isn’t before you delete it.
Action
If you have selected a file using the left mouse but-
ton, a context menu can be retrieved using the right
mouse button. Probably the most useful actions are
viewing the file using View file and deleting it using
Delete file. We can, therefore, go through the cache
and, if need be, remove particular files. MIME-type
Figure 3: Setting the external viewer
Info
Nscache home page
http://nscache.sourceforge.net
Figure 1: A tree view of the Netscape cache
Figure 2: Sorted view
2 · 2000
LINUX
MAGAZINE 107
Plik z chomika:
Kapy97
Inne pliki z tego folderu:
2002.07_Out of the Box-Checkinstall Utility.pdf
(111 KB)
2002.07_Linux Web Sites-Our Selection of Useful Internet Sites.pdf
(99 KB)
2002.07_Intro.pdf
(71 KB)
2002.07_Dr Linux-Multitasking, Job Control and Warn of Zombies.pdf
(146 KB)
2002.07_Desktopia-Procmeter and the Proc Directory.pdf
(199 KB)
Inne foldery tego chomika:
Business News
Comment
Community
Community Notebook
Cover Feature
Zgłoś jeśli
naruszono regulamin