find: Markdown format tweaks, introduce the '+' operator for exec (#12126)

pull/23/head
soleofthesea 2024-01-25 10:00:15 +08:00 committed by GitHub
parent 53f13d5d03
commit e100804204
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -25,11 +25,11 @@
- Run a command for each file (use `{}` within the command to access the filename):
`find {{root_path}} -name '{{*.ext}}' -exec {{wc -l {} }}\;`
`find {{root_path}} -name '{{*.ext}}' -exec {{wc -l}} {} \;`
- Find files modified in the last 7 days:
- Find all files modified today and pass the results to a single command as arguments:
`find {{root_path}} -daystart -mtime -{{7}}`
`find {{root_path}} -daystart -mtime {{-1}} -exec {{tar -cvf archive.tar}} {} \+`
- Find empty (0 byte) files and delete them: