Re: newbie needs help veiwing files
On Fri, 28 Jan 2000, Shaul Karl wrote:
> >
> >
> > --- DOUGLAS HUNTER <l97dh@tay.ac.uk> wrote:
> > > When I'm in bash and trying to ls large files I can only see the last
> > > part of the file due to it scrolling past too fast.
> > > Is there a command to insert that means I can veiw the output page by
> > > page and change pages when I want to ?
> >
> > ls | more
> >
> > The pipe ('|') feeds stdout from the first command into stdin of the second
> > one.
> >
> >
>
> Is there a difference between the pipe ('|') and the redirection ('>')?
Hi
Pipes |
Expects two programs, the first must write standard out, stdout,
the second must read standard in, stdin. Then the command line:
cat file | less
sends stdout from cat file to a fifo file on the disk which is then
read into stdin for less (and is displayed a page at a time).
Redirect >
Expects the program to write stdout, and opens a file for writing
(deleting any former contents) and writes the output of the program
ls > filelist
the file, filelist, is opened for writing, any former contents
deleted, and the directory listing from ls is written on filelist.
Hope this helps.
--David
David Teague, dbt@cs.wcu.edu
Debian GNU/Linux Because software support is free, timely,
useful, technically accurate, and friendly.
(I'm hoping this is all of the above!)
Reply to: