Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
find command - korn shell
Name: palmac Date: September 16, 2003 at 02:43:09 Pacific OS: Solaris CPU/Ram: sparc
Comment:
Hi, Anyone knows how to use the 'find' command using a specified depth level within the directoy hierarchy? for instance: find * -type f -name
this will search including all subdirectories, is there a way to specify the level of depth used? Thank you
Name: Nails Date: September 16, 2003 at 19:26:29 Pacific
Reply:
Hi:
The GNU version of find supports maxdepths. From the Red Hat 7.1 man page:
-maxdepth levels Descend at most levels (a non-negative integer) levels of directories below the command line arguments. `-maxdepth 0' means only apply the tests and actions to the command line arguments.
Summary: If what you are looking for is a random single digit, check "parameter substitution" section of man for ksh, or find good korn shell manual. As an example use the following to generate a single rando...
Summary: If I try to kill a shell from that shell's command prompt itself, then what happens.Im doing it from korn shell. Ex: /bin/ksh echo $KSHPID It outputs 304,say kill 304. ...
Summary: I know that grep the_specified_string myfile can finds a line that contains a specified string in a file. How can I reach the same goal in a korn shell script? Thanks a lot for your help! Mei ...