![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pls help! complex find and replace | lakanino | Shell Programming and Scripting | 2 | 03-12-2009 05:46 PM |
| complex find in script | TimHortons | Shell Programming and Scripting | 5 | 01-27-2009 09:55 AM |
| Complex find grep or sed command | sjburden | Shell Programming and Scripting | 3 | 05-31-2008 10:45 PM |
| complex grep command | naamas03 | Shell Programming and Scripting | 0 | 11-21-2007 04:59 AM |
| advanced/complex uses of the find command | Perderabo | Answers to Frequently Asked Questions | 0 | 05-04-2004 02:13 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
complex find command
Hi all,
I am trying to execute the following command: Code:
find 'path' -ls -exec cksum {} \;
My problem is this, if i have a FIFO in a directory the find tries to execute cksum on it and gets stuck. From the man page i understood that i cannot use -type and -exec together so i am quite stuck here. any ideas? |
|
||||
|
Thank you for answering,
It is possible to use them together but when you use them together it is undefined who goes first. Sometimes first the type will be checked and then the exec activted and sometimes the other way around. ---------- Post updated at 06:53 AM ---------- Previous update was at 06:52 AM ---------- the solaris man page. Solaris 5.10 ---------- Post updated at 06:54 AM ---------- Previous update was at 06:53 AM ---------- Code:
Using -type is not sufficient to restrict the type
of files on which the -exec command operates, because there
is an inherent race condition between the type-check per-
formed by the find command and the time the executed command
operates on the file argument.
|
|
||||
|
Hi.
The exec will be done depending on its place in the command. If you put it after the directory, filename, and type, etc. then it will after those are evanulated. I've never experienced where the order is "underfined". |
| Bits Awarded / Charged to scottn for this Post | |||
| Date | User | Comment | Amount |
| 10-22-2009 | noam128 | N/A | 5,000 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|