This error message is usually encountered when using the find command in Unix or Linux systems. It means that the exec option is missing its required argument.

Syntax of the find command with the exec option is:

find [path] [expression] -exec [command] {} \;

Here, [path] is the starting directory for the search, [expression] is the search criteria, [command] is the command to be executed on each found file, and {} represents the found file.

The error message "missing argument to -exec'" usually occurs when the commandargument is missing after the-exec` option. For example:

find /home/user -name "*.txt" -exec {} \;

In this example, the command to be executed is missing after the -exec option. To fix the error, you need to specify the command that should be executed. For example:

find /home/user -name "*.txt" -exec rm {} \;

This command will delete all files with the ".txt" extension found in the /home/user directory.

find: missing argument to `-exec'

原文地址: https://www.cveoy.top/t/topic/qiY 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录