Cannot run find of Unix
search cancel

Cannot run find of Unix

book

Article ID: 267556

calendar_today

Updated On: 10-07-2023

Products

CA Workload Automation DE

Issue/Introduction

We want to submit "find /tmp/tmp1 -type f -exec cp {} \;" on a Linux agent.
The job fails with error "find: missing argument to '-exec'".

 

Environment

Release : 12.2

Resolution

Following command must be used in the "commands" field and not part in the "arguments to pass"

"find /tmp/tmp1 -type f -exec cp {} \;

 

Additional Information

The problem is due to the options/possibilities you have with the find command.

By using the option '-exec cp {} ...".  This is what is called a placeholder. 
When using  {}  the output of previous command will send to next by using -exec, so the output is kept in {}, which is the placeholder.

This is causing to pass a secondary  new command in the "arguments to pass" field.
The system agent consider this as arguments and can doesn't see that there is a new command in this argument.