LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2004, 07:46 PM   #1
rsearing
Member
 
Registered: Aug 2004
Location: Kansas City
Posts: 30

Rep: Reputation: 15
Pausing when scrolling in CLI


How do you pause a scroll..for instance, when I do a dir and there are a ton of files in the directory...how can I see the ones up front?

Please help!
Rob
 
Old 08-12-2004, 08:09 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,854

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
"How do you pause a scroll..for instance, when I do a dir and there are a ton of files in the directory...how can I see the ones up front?"

Pipe the ls output to less. For example:

ls -l /root/* | less


-------------------
Steve Stites
 
Old 08-12-2004, 08:11 PM   #3
rsearing
Member
 
Registered: Aug 2004
Location: Kansas City
Posts: 30

Original Poster
Rep: Reputation: 15
Got it .. thanks!

-Rob
 
Old 08-12-2004, 09:41 PM   #4
irlandes
Member
 
Registered: Nov 2003
Posts: 117

Rep: Reputation: 16
A lot of stuff...

You can put a lot of stuff in less. For example, cat /path/filename | less will shove that file into less, much as if it were the DOS type command, except you can move up and down through less, and q quits less.

grep etc. | less also moves stuff to less. ETc. is really etc. not a command option.

If you see something that could make an output to standard out, which is screen, you can almost always pipe it to less.

I think recenlty I was looking for a certain file on Cd, to find out which rpm had it, after moving file browser to the C-D Rpm folder, I did:

rpm -qpl * | less

and I got all the files in all the rpm's in less. I am not sure, because that is like many MB, so maybe it was a subfolder, but I think it was all the files. Usually, I prefer to make a file of files, so to speak:

rpm -qpl * > /path/filename.txt then I can have it on hand to open with a word processor or KATE any tme I want. In this case, I was in a hurry so I less-ed it.


Also, rpm -qpi * | less

gives you all the info on the rpms

Do not be afraid to experiment.


By the way, more also works in linux, see man more, but it is so primitive compared to linux that almsot no one ever mentions it.

Last edited by irlandes; 08-12-2004 at 09:48 PM.
 
Old 08-12-2004, 10:12 PM   #5
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
You can also use <Shift> along with <PageUp>/<PageDown>, or with the up and down arrows in some X terminals. The number of saved lines allowed with the terminal affects whether or not you can scroll all the way up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pausing the screen JStew Programming 8 02-27-2007 08:47 AM
hard scrolling vs soft scrolling (console) haxcess Linux - General 2 08-30-2004 12:17 AM
shell command for pausing Toshi3 Linux - Newbie 4 05-23-2004 03:10 PM
Pausing a program kamransoomro84 Linux - General 0 05-08-2004 04:25 PM
Pausing downloads KptnKrill Linux - Newbie 3 07-28-2003 09:30 PM


All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration