LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   listing of directories with ls - R - produces an overhead of data (https://www.linuxquestions.org/questions/linux-newbie-8/listing-of-directories-with-ls-r-produces-an-overhead-of-data-4175483502/)

sayhello_to_the_world 11-05-2013 03:59 PM

listing of directories with ls - R - produces an overhead of data
 
hello dear linux-experts

i want to have the listing of some directories

i have set up a http-server in opensuse 12.3

i want to have a listing

but - if i do a ls -R in

martin@linux-70ce:/srv> ls -R

i get a bunch of information - too much - see

http://pastebin.com/CNbxBmd6


see the explanation - here
Code:

If you want a recursive directory listing in Unix, one of the following may be useful:
ls -R        Not all versions of ls have -R
find . -print        Should work everywhere
du -a .        Shows you both the name and size

what can i do to get only the overview on the directories in the forlder svr


love to hear frrom you
say :)

Robhogg 11-05-2013 04:15 PM

Hi Say,

If you only want to see directories, find is probably the best command:

Code:

find /srv -type d
"-type d" is (of course) directory. It's worth getting to know find - it's a very versatile command.

suicidaleggroll 11-05-2013 04:28 PM

You could also do
Code:

ls -d /srv/*/
The trailing slash means it will only print directories, and the -d flag means it will only print the directory names, rather than their contents.

sayhello_to_the_world 11-28-2013 12:29 PM

hello

what bout the aimed listing of all the directories of /home

is this possible?


note: what robhogg suggested is quite hard to do: the following code
Quote:

find /srv -type d
gives back a bunch of data - it gives back ( a ) terrible much of "overhead.... "

cremetorte 11-28-2013 12:36 PM

ls -d /home/*/

allend 11-28-2013 04:50 PM

An alternative might be 'tree -d'. You can limit the depth of the tree with the -L option.


All times are GMT -5. The time now is 02:52 AM.