I'm having trouble with the following script that I've created to look in a specific directory for files containing 'file_v' and execute the find -exec command:
FILE_LOC=/tmp
find "$FILE_LOC" -name '*file_v*' -exec
echo 'file exists in the /tmp directory';
I have a file named file_v123.txt in the /tmp directory.
output:
find: missing argument to '-exec'
file exists in the /tmp directory
It's producing the missing argument to '-exec' message, which to me means that my syntax isn't correct, although it is correctly outputing the 'file exists in the /tmp directory' message. Can I get some help on how to resolve this please?