Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _2020/shell-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ find . -size +500k -size -10M -name '*.tar.gz'
# Delete all files with .tmp extension
find . -name '*.tmp' -exec rm {} \;
# Find all PNG files and convert them to JPG
find . -name '*.png' -exec convert {} {.}.jpg \;
find . -name '*.png' -exec convert {} {}.jpg \;
```

尽管 `find` 用途广泛,它的语法却比较难以记忆。例如,为了查找满足模式 `PATTERN` 的文件,您需要执行 `find -name '*PATTERN*'` (如果您希望模式匹配时是不区分大小写,可以使用`-iname`选项)
Expand Down