maxdepth in avaible for AIX?


 
Thread Tools Search this Thread
Operating Systems AIX maxdepth in avaible for AIX?
# 1  
Old 10-20-2009
maxdepth in avaible for AIX?

Hi,

I'm trying to do a search in a directory on AIX and I was wondering if there's an equivelant option to the -maxdepth option to tell how far down to search.

I ran this but I just want to make sure it's actually searching everything:

Code:
find ./* -type f -name "090817*" -exec ls -l {} \;

# 2  
Old 10-20-2009
You have a couple of options, though neither is as nice as maxdepth:

-xdev Prevents the find command from traversing a file system different from the one specified by the Path parameter.

-prune Stops the descent of the current path name if it is a directory.

Cheers,

Keith
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

What is wrong with 'find . -maxdepth 1 -ctime -7 -type f'?

Have you tried running the command below? On the same RHEl 6.8 or 6.6. It will give you different output. find . -maxdepth 1 -ctime -7 -type f rpm -qa|grep find findutils-4.4.2-9.el6.x86_64 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago) # (6 Replies)
Discussion started by: invinzin21
6 Replies

2. Shell Programming and Scripting

Maxdepth option of find command not working

Can you please figure out what is the issue here $ find . -maxdepth 1 -type f -size 0 -print find: bad option -maxdepth please find the OS details $ uname -a HP-UX g5u1216 B.11.31 U ia64 2614088426 unlimited-user license Use code tags, thanks. (6 Replies)
Discussion started by: TomG
6 Replies

3. Shell Programming and Scripting

Maxdepth command not working in AIX.Need alternative solution for this command

Hi All, I am trying to select 30 days older files under current directory ,but not from subdirectory using below command. find <Dir> -type f -mtime + 30 This command selecting all the files from current directory and also from sub directory . I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies

4. AIX

Will it affect my AIX LPAR security, when i set up email alerts on AIX server.

Hello, I've set up email alerts on AIX Servers. so that i can get email notifications (via mail relay server) when ever there is abnormal behavior. for example 1) my script monitors CPU/disk/memory etc... when it reaches high water ark, it will send an email alert. 2) disk usage alerts 3)... (5 Replies)
Discussion started by: System Admin 77
5 Replies

5. UNIX for Dummies Questions & Answers

I want alternative of -maxdepth 1 for all Linux,Solaris and AIX

find /full/path/dir \( ! -name dir -o -type f \) -prune -type f on AIX it worked perfect : sdp1:/var/tmp/test# find /var/tmp/test/ \( ! -name test -o -type f \) -prune \ -name "*properties" -type f -exec ls -l {} \; -exec cksum {} \; -rw------- 1 root system 19 Dec 12... (5 Replies)
Discussion started by: laxmikant.hcl
5 Replies

6. AIX

Nim on AIX 7.1 used to migrate AIX 5.3 to AIX 6.1...is possible?

Using nimadm: nimadm -j nimadmvg -c sap024 -s spot_6100 -l lpp_6100 -d "hdisk1" -Y Initializing the NIM master. Initializing NIM client sap024. 0505-205 nimadm: The level of bos.alt_disk_install.rte installed in SPOT spot_6100 (6.1.3.4) does not match the NIM master's level (7.1.1.2).... (2 Replies)
Discussion started by: sciacca75
2 Replies

7. 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

8. UNIX for Dummies Questions & Answers

Solaris find without maxdepth

Hi, I am using Solaris 5.8 I searched online, the find command has an option called maxdepth which can be used to limit the number of directories find will look into. find . -maxdepth 2 -type f When I run the above command in solaris, I get an error find: bad option -maxdepth find:... (2 Replies)
Discussion started by: Leion
2 Replies
Login or Register to Ask a Question