1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00

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

This commit is contained in:
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

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: