Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

AIX 5 find -maxdepth replacement: -prune (finding without descending subdirectories)
https://forum.ivorde.com/aix-5-find-maxdepth-replacement-prune-finding-without-descending-subdirectories-t69.html
Page 1 of 1

Author:  debuser [ Mon Mar 29, 2010 10:12 am ]
Post subject:  AIX 5 find -maxdepth replacement: -prune (finding without descending subdirectories)

Here are 3 little tips for using find under AIX to search files by specific i-node attribute, without descending into subdirectories (maxdepth 1).

1) Install find from AIX Linux toolbox

2)
Code:
find . ! -name . -prune -type f

3)
Code:
find * -prune -type f
In this case, the metacharacter star will instruct find to operate in the current directory. So you can either cd to desired dir, or
Code:
find /path/to/dest/dir/* -prune -type f

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/