gpt-3.5-turbo-0613· openai
Suzhen/CodeChat
find /path/to/directory -type f -name “*.tgz” -exec sh -c 'dir=$(dirname “{}”); tar -xzf…
- User
find /path/to/directory -type f -name “*.tgz” -exec sh -c 'dir=$(dirname “{}”); tar -xzf “{}” -C
- Assistant
"$dir"' ;' ;
- User
find ./ -type f -name "*.tgz" -exec sh -c 'dir=dir";' ; find: missing argument to `-exec'
- Assistant
The command you provided seems to be missing a closing curly brace for the "-exec" option. Try using the following command:
find ./ -type f -name "*.tgz" -exec sh -c 'dir=$(dirname "{}"); tar -xzf "{}" -C "$dir";' \;