Operating System - HP-UX
1847822 Members
4030 Online
104021 Solutions
New Discussion

Re: I´m looking for a Command

 
SOLVED
Go to solution
billh_1
New Member

I´m looking for a Command

Hi,
I´m in a directory and search for a command
who show´s me only the subdirectory´s, not the
data files.
Thank You
9 REPLIES 9
Bernhard Mueller
Honored Contributor
Solution

Re: I´m looking for a Command

find . -type d

Regards,
Bernhard
billh_1
New Member

Re: I´m looking for a Command

Hi Bernhard,
thank you for this command.

Regards
Ulli
Rory R Hammond
Trusted Contributor

Re: I´m looking for a Command


If you want to see directory information

find . -type d -exec ls -ld {} \;

Rory
There are a 100 ways to do things and 97 of them are right
Tvs
Regular Advisor

Re: I´m looking for a Command

Hi

# ls -lRt | grep "^d"

u can get only the driectory

regards

tvs
Muthukumar_5
Honored Contributor

Re: I´m looking for a Command

Try like,

# alias subdir='find . -type d'

so that execution of subdir will show sub directories available in the current directory.

# subdir
will give sub directories now..

Put this into /etc/profile file so that it will activated to all users.

--
Muthu
Easy to suggest when don't know about the problem!
Arturo Galbiati
Esteemed Contributor

Re: I´m looking for a Command

Hi,
ls -AFl|grep "^d"
HTH,
Art
Raj D.
Honored Contributor

Re: I´m looking for a Command

Hi Billih ,

You can do it like this also:

$ alias showdir='ls -l | grep ^d'
$ showdir

( It will list all the directories under your current directory)

You can also put it in .profile


Enjoy,
hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Rick Garland
Honored Contributor

Re: I´m looking for a Command

alias lsd='ls -la | grep ^d'

BTW, Timothy Leary has been gone for awhile now...

billh_1
New Member

Re: I´m looking for a Command

Hi All,
it0s enough,OK ok.
Thank You for your work and thinking.

Best regards
Ulli Billhofer