summaryrefslogtreecommitdiff
path: root/Base/usr
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-11-28 14:21:31 +0300
committerAndreas Kling <kling@serenityos.org>2020-11-28 14:28:58 +0100
commit952c0dc2a02e92ba6380cba7fde8e4f9f00af257 (patch)
treec7423500d4a8be22a1ef266f7cba53d72de089a9 /Base/usr
parent1abda05d3817d88e8affc703cabac71396570f5b (diff)
downloadserenity-952c0dc2a02e92ba6380cba7fde8e4f9f00af257.zip
Userland: Implement find -name clause
Closes https://github.com/SerenityOS/serenity/issues/4191
Diffstat (limited to 'Base/usr')
-rw-r--r--Base/usr/share/man/man1/find.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/Base/usr/share/man/man1/find.md b/Base/usr/share/man/man1/find.md
index 1e89fa0d3c..f7f2c57581 100644
--- a/Base/usr/share/man/man1/find.md
+++ b/Base/usr/share/man/man1/find.md
@@ -35,6 +35,10 @@ specified commands, a `-print` command is implicitly appended.
* `-size number[c]`: Checks if the file has the given size in 512-byte blocks,
rounded up. If the size is followed by the `c` character, checks if the file
has the given size in bytes.
+* `-name pattern`: Checks if the file name matches the given global-style
+ pattern (case sensitive).
+* `-iname pattern`: Checks if the file name matches the given global-style
+ pattern (case insensitive).
* `-print`: Outputs the file path, followed by a newline. Always evaluates to
true.
* `-print0`: Outputs the file path, followed by a zero byte. Always evaluates to
@@ -62,6 +66,8 @@ $ find -type d
$ find /tmp "(" -type s -o -user anon ")" -exec rm "{}" ";"
# Concatenate files with weird characters in their names:
$ find -type f -print0 | xargs -0 cat
+# Find files with the word "config" in their name:
+$ find -name \*config\*
```
## See also