LinuxQuestions.org
Visit Jeremy's Blog.
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, 04:59 PM   #1
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 220

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 05:05 PM.
 
Old 11-05-2013, 05:15 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 88
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, 05:28 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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, 01:29 PM   #4
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 220

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 01:45 PM.
 
Old 11-28-2013, 01:36 PM   #5
cremetorte
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
ls -d /home/*/
 
Old 11-28-2013, 05:50 PM   #6
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,429

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


Reply


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


All times are GMT -5. The time now is 08:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration