Using find on solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Using find on solaris
# 1  
Old 09-22-2008
Using find on solaris

Hello,
I have searched the forum but I can't find any compliant answer to my problem.
I have to list all directories on a filesystem on a solaris 5.9 up to 4th level, but it seems there's no -level or -maxdepth option.
I tried to xargs or -exec the result of the find command by testing the NF (number of fields variable) with "/" separator, but I didn't get a correct result.
Please can you help me ?
Thank tou

Dave
# 2  
Old 09-22-2008
I believe this should work:

Code:
 find * */*  */*/* */*/*/* -prune

# 3  
Old 09-22-2008
Quote:
Originally Posted by Tytalus
I believe this should work:

Code:
 find * */*  */*/* */*/*/* -prune

Thanks a lot, it works !
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

How to find MQ details on Solaris 5.8?

Hi All, I want to find MQ details on a solaris 5.8 server , does anyone knows the command to findout the details I have used below command to find the following o/p command pkginfo | grep -i mq o/p application mqm WebSphere MQ for Sun Solaris application... (4 Replies)
Discussion started by: Jcpratap
4 Replies

2. Solaris

Is it possible to find the seek rate of the find command in Solaris?

Hello, I am running some performance based tests on Solaris, and I was wondering how fast the "seeking" rate of Solaris is, or how fast Solaris can get information about files with the "find" command. Does anyone know what 'find' command I could run to traverse through my system to see the rate... (1 Reply)
Discussion started by: bstring
1 Replies

3. UNIX for Dummies Questions & Answers

"-maxdepth 1" argument for Solaris find. Other way to restrict find in only one directory?

Hi I wish to find only files in dir /srv/container/content/imz06/. It means exclude subfolder /srv/container/content/imz06/archive/ > uname -a SunOS testbox6 5.10 Generic_139555-08 sun4v sparc SUNW,Sun-Blade-T6320Its Solaris default "find" > find /srv/container/content/imz06/* -name... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

4. Programming

how to find if C compiler in Solaris

Hi experts, How do I find if a C compiler is installed on Solaris ? > cc -o ksh: cc: not found > CC ksh: CC: not found > gcc ksh: gcc: not found I am using Solaris 5.8 Thanks, Sameer. (1 Reply)
Discussion started by: ensameer
1 Replies

5. Solaris

where can I find programs for solaris?

I'm running Sun OS 5.9 and I need to find a place that has a precompiled version of the make command (I have no way of compiling software) and I would like to find a decent software repository, binaries are preferred but well maintained and easy to assemble (isn't lacking half a dozen dependencies... (7 Replies)
Discussion started by: tech53
7 Replies

6. UNIX for Dummies Questions & Answers

How do i find if Solaris is 32 or 64 bit.

Hi, How do I find what version of solaris my Sparc system is running(32 bit or 64 bit). Can a 64 bit sparc run 32 bit solaris? Please let me know Thanks (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

7. Solaris

where i can find Solaris 9 installetion ?

Hello , our installation disk is corrupted where i can find Solaris 9 installation on the web? thanks (1 Reply)
Discussion started by: umen
1 Replies

8. UNIX for Dummies Questions & Answers

Find command in Solaris

Hi folks, I am DBA who needs some help with find command. We have a directory with files dated from January 1, 2001. Several files are created each day. We probably have several hundred files. I want to delete all files OLDER than 90 days (I want to keep files that are 90 days before today &... (3 Replies)
Discussion started by: srolen
3 Replies
Login or Register to Ask a Question