Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-28-2005, 09:50 PM   #1
LQ Newbie
Registered: Apr 2005
Distribution: TBA
Posts: 4

Rep: Reputation: 0
An ultra newbie question


I know theres a way to do this I just forgot and for some reason can't find it anywhere!

When doing any command in a cli, how can I get it to stop after a certain amount of lines

like for example, if I ls -l in /dev I get way too many results to see on one screen. I want something like the DOS (gasp) equivelent of "dir /p"
Old 04-28-2005, 09:52 PM   #2
Registered: Jan 2004
Location: /dev/random
Distribution: Gentoo amd64, CrunchBang amd64
Posts: 350

Rep: Reputation: 32
"ls -l /dev | less" is what you want my friend. The pipe symbol is your friend. (you could use more as well, but you probably want to be able to scroll both ways)
Old 04-28-2005, 09:58 PM   #3
LQ Newbie
Registered: Apr 2005
Distribution: TBA
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks! Debian doesn't appear to have a less command in bash, but more works great, and aliases rock.
Old 04-29-2005, 01:01 AM   #4
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
"/ls -l | less" doesn't work in debian?
Old 04-29-2005, 01:23 AM   #5
LQ Newbie
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
You could you instead,

ls -l |more
USE SPACE to move down


ls -l |pg
Old 04-29-2005, 06:57 AM   #6
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Originally posted by AndyBaird
Thanks! Debian doesn't appear to have a less command in bash, but more works great, and aliases rock.
Less is not a bash feature, its a standalone program. You have to install it.
apt-get install less
Old 04-29-2005, 07:20 AM   #7
Registered: Apr 2005
Location: Los Angeles
Distribution: openSUSE / Ubuntu
Posts: 294

Rep: Reputation: 33
You could also simply scroll up. For example since I'm on KDE, I go to a console and type l or ls in my downloads directory, there's 200 some entries. I can scroll up on the console window back to the beginning.

That might help, too.


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
help needed, ultra newbie configuring sound.... haora Linux - Newbie 4 03-21-2005 12:15 PM
SUPER ultra noob question lellyville Slackware 7 03-03-2005 02:04 PM
Help for an ultra Newbie gbrewste Linux - Newbie 13 06-19-2004 09:52 AM
Installing RPM (Ultra Newbie Question) pleasehelp Linux - Software 8 02-02-2004 07:57 PM
Ultra Newbie Quickie MasterC Linux - General 2 05-07-2002 04:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:23 AM.

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