LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-05-2013, 03:59 PM   #1
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 229

Rep: Reputation: Disabled
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

Last edited by sayhello_to_the_world; 11-05-2013 at 04:05 PM.
 
Old 11-05-2013, 04:15 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
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.
 
Old 11-05-2013, 04:28 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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.
 
Old 11-28-2013, 12:29 PM   #4
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 229

Original Poster
Rep: Reputation: Disabled
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.... "

Last edited by sayhello_to_the_world; 11-28-2013 at 12:45 PM.
 
Old 11-28-2013, 12:36 PM   #5
cremetorte
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
ls -d /home/*/
 
Old 11-28-2013, 04:50 PM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

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


Reply



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
Listing Huge Directories Woodsman Slackware 8 12-16-2007 02:29 PM
Recursive directories listing cdog Linux - General 11 12-09-2006 07:04 AM
Listing largest directories jrdioko Linux - Software 1 07-19-2006 08:08 PM
Listing all directories only anjanesh Linux - Newbie 5 06-20-2006 03:23 AM
Bash - listing directories tarja Programming 8 12-03-2005 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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