The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Initiative helps farmers in rural India using OSS iBot UNIX and Linux RSS News 0 03-26-2008 11:50 AM
New Tool Helps Lock Down Linux - Dark Reading iBot UNIX and Linux RSS News 0 08-13-2007 12:00 PM
Linux helps Oracle databases edge IBM - Techworld.com iBot UNIX and Linux RSS News 0 06-19-2007 03:00 AM
hpux admin tutorial online helps or links hpux2006 UNIX for Dummies Questions & Answers 2 08-30-2006 05:19 PM
How does an Administrator helps Progremmers sol8admin SUN Solaris 2 02-09-2005 02:35 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 09-19-2001
Registered User
 

Join Date: Sep 2001
Location: GUess
Posts: 15
Thumbs up this helps me out big time

ever since i started playing with unix at work i have found all kinds of helpful tools that my companie has added into our /usr/bin/

this is the one that helped the most


""""""ldr"""""""
Code:
#!/bin/sh
#
#  @(#) %filespec: ldr-2 %  %date_modified: Wed Sep  6 09:54:07 2000 %
#
#         Module:  ldr
#
#         List directories.
#         If directory name is not specified, list directories
#         under current directory.
#
#         Usage:  <ldr [dir name]>
#

if test $# -lt 1
then
   DIR="."
else
   DIR=$1
fi

for arg in $DIR/*
do
   if [ -d $arg ]
   then
      echo `basename $arg`
   fi
done
exit 0  
#
#
#
##########################################

lists all your dirs in the dir that your in




added code tags for readability --oombera
__________________
Remember Kiddys Unix is DOS for ADULTS

Last edited by oombera; 02-18-2004 at 01:05 PM.
Forum Sponsor
  #2  
Old 09-20-2001
flim flam flamma jamma
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
Code:
ls -lR|grep ^d|awk '{ print $9 }'
this will also work. One of the best things about unix is there are atleast 10 ways to do the same thing. Each haveing its ups and downs over the other.

Last edited by Optimus_P; 09-20-2001 at 06:44 AM.
  #3  
Old 09-20-2001
Registered User
 

Join Date: Sep 2001
Location: Johanessburg
Posts: 27
DIR

While on the subject.

If you would like to navigate a little faster this help a lot

move to the root dirrectory
/
/du > ( new filename )

####################

du = summarize disk usage ( by listing dirrec...)

> basically moves the out of du into a file of your own.

Have fun.
  #4  
Old 09-20-2001
Registered User
 

Join Date: Sep 2001
Location: Johanessburg
Posts: 27
DIR

While on the subject.

If you would like to navigate a little faster this help a lot

move to the root dirrectory
/
/du > ( new filename )

####################

du = summarize disk usage ( by listing dirrec...)

> basically moves the output of du into a file of your own.

Have fun.
  #5  
Old 09-21-2001
Registered User
 

Join Date: Sep 2001
Location: Portland, Oregon USA
Posts: 24
thanks, thats some good stuff.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0