How to replace find -maxdepth option in Solaris Operating System using -prone

 In linux we normally use the option -maxdepth with the find command to report all files and links in the currect directory, not recursively
 
for example:-
find /some/directory/ -maxdepth 1 -type f -name *.log
 
 But when we use the same in Oralce Solaris OS, the command will give error as maxdepth is not an option recogonized in the system.
We can replace it with -prone and the syntax is as follows:-

find /some/directory/* -prune -type f -name *.log
 
 this should also work with IBM-AIX OS
 
 

Comments

Popular posts from this blog

CDbConnection failed to open the DB connection mysql 8

/bin/sh^M: bad interpreter: No such file or directory Linux

Send mail from Oracle Solaris OS with attached files