Latest LQ Deal: Latest LQ Deals
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-07-2003, 06:19 PM   #1
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Rep: Reputation: 30
list of directories

What is the name of a file that lists all the directory and files in the Linux?
And where is it located?
Old 08-07-2003, 06:22 PM   #2
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30

are you searching for dir in DOS lookalike? Well if you are, it's ls and it's located in /usr/bin/ls (if not there, then in /bin/ls).
Old 08-07-2003, 11:26 PM   #3
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
Old 08-08-2003, 12:45 AM   #4
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Original Poster
Rep: Reputation: 30
Ok, so 'ls' lists files and directories.
But is there somewhere a file that stores all the tree or something like that?
In other words, what happens when you run 'ls' command? Where and how does the 'ls' command look for the information? Where is the information stored?
Old 08-08-2003, 01:15 AM   #5
LQ Newbie
Registered: Aug 2002
Distribution: Slackware 9 FreeBSD 4.8
Posts: 9

Rep: Reputation: 0
AFAIK the filesystem is represented as a linked list (or similar) of inodes which the command would find the correct point and then loop through the structure.

Old 08-08-2003, 04:11 AM   #6
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
I am not discouraging the continuing of this question, by all means, ask away. But just an FYI:
From a newbies perspective, that really shouldn't matter at all. If you are programming, or if you are simply THAT hard corps, go for it. But don't overwhelm yourself with info like that if you are just learning linux, there's much more stuff that where 'ls' comes from



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
[SOLVED] command to list directories only frieza Linux - Software 16 04-01-2016 12:53 PM
Can ls recursively list only directories? Vosper Linux - General 3 07-16-2005 04:57 AM
proftpd directories list bacon22 Linux - Networking 2 01-21-2004 10:49 AM
list sub-directories only CowboyJ Linux - Newbie 1 12-05-2003 12:42 AM
Asking LS for a list of directories only gary knott Linux - Newbie 1 11-12-2003 06:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 PM.

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