Files
oldlinux-files/docs/Install-Guide/install-guide-2.2.2/node113.html
2024-02-19 00:23:35 -05:00

58 lines
3.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>3.3.7 Looking at files</TITLE>
</HEAD>
<BODY>
<meta name="description" value="3.3.7 Looking at files">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html3192 HREF="node114.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3190 HREF="node106.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3184 HREF="node112.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3194 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3195 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3193 HREF="node114.html">3.3.8 Getting online help</A>
<B>Up:</B> <A NAME=tex2html3191 HREF="node106.html">3.3 First Steps into </A>
<B> Previous:</B> <A NAME=tex2html3185 HREF="node112.html">3.3.6 Deleting files and </A>
<BR> <HR> <P>
<H2><A NAME=SECTION00537000000000000000>3.3.7 Looking at files</A></H2>
<P>
<A NAME=2310>&#160;</A>
<A NAME=2363>&#160;</A>
<A NAME=2364>&#160;</A>
The commands <tt>more</tt> and <tt>cat</tt> are used for viewing the
contents of files. <tt>more</tt> displays a file, one screenful at a
time, while <tt>cat</tt> displays the whole file at once.
<P>
To look at the file <tt>shells</tt>, we can use the command
<P><TT> /home/larry/foo# <em>more shells</em>
<P></TT>
<P>
In case you're interested what <tt>shells</tt> contains, it's a list
of valid shell programs on your system. On most systems, this includes
<tt>/bin/sh</tt>, <tt>/bin/bash</tt>, and <tt>/bin/csh</tt>. We'll talk about
these different types of shells later.
<P>
While using <tt>more</tt>, press <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img104.gif"> to display the next page
of text, and <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img105.gif"> to display the previous page. There are other
commands available in <tt>more</tt> as well, these are just the basics.
Pressing <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img106.gif"> will quit <tt>more</tt>.
<P>
Quit <tt>more</tt> and try <tt>cat /etc/termcap</tt>. The text will probably fly
by much too quickly for you to read it.
The name ``<tt>cat</tt>'' actually stands for ``concatenate'', which is the
real use of the program. The <tt>cat</tt> command can be used to concatenate
the contents of several files and save the result to another file.
This will be discussed later.
<P>
<BR> <HR><A NAME=tex2html3192 HREF="node114.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3190 HREF="node106.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3184 HREF="node112.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3194 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3195 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3193 HREF="node114.html">3.3.8 Getting online help</A>
<B>Up:</B> <A NAME=tex2html3191 HREF="node106.html">3.3 First Steps into </A>
<B> Previous:</B> <A NAME=tex2html3185 HREF="node112.html">3.3.6 Deleting files and </A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>