Visit Jeremy's Blog.
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 08-21-2003, 01:01 PM   #1
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Rep: Reputation: 15
dir question

Ok, perhaps this is one of the most newbie question ever

For a directory that contains many files, how can I "dir" the directory to view the top section of the directory?

What I mean is ... when I dir a directory, since there're too many files inside... I can't see the entire files list.

In MS-Dos, I think it's something like "dir /w" or something similar

Old 08-21-2003, 01:05 PM   #2
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
theres a couple you may like to use:
dir -x
dir -C
dir -m but this one is kinda ugly

Last edited by DrOzz; 08-21-2003 at 01:07 PM.
Old 08-21-2003, 01:05 PM   #3
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
You can use:
ls | less

and you will be able to scroll up and down. To exit, just type q.

For the top only, try:
ls | head

Old 08-21-2003, 01:11 PM   #4
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 68
Twice in 2 days:


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
Simple Question - How much space is a dir taking up? elitecodex Linux - Newbie 4 06-22-2005 09:17 AM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 07:54 PM
PWD question : Current dir not full path facets Programming 2 06-09-2004 04:58 AM
simple bash question -- changing dir towlie Programming 3 05-28-2004 11:55 AM
a question of tmp dir for solaris/win cybercop12us Solaris / OpenSolaris 4 01-08-2003 03:22 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:59 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
Open Source Consulting | Domain Registration