Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit 7bc9c4f

Browse files
added version info and description from man pages
1 parent a182065 commit 7bc9c4f

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

wheres_my_file.md

+47-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,30 @@
99

1010
## <a name="find"></a>find
1111

12-
>search for files in a directory hierarchy
12+
```bash
13+
$ find --version | head -n1
14+
find (GNU findutils) 4.7.0-git
15+
16+
$ man find
17+
FIND(1) General Commands Manual FIND(1)
18+
19+
NAME
20+
find - search for files in a directory hierarchy
21+
22+
SYNOPSIS
23+
find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...]
24+
[expression]
25+
26+
DESCRIPTION
27+
This manual page documents the GNU version of find. GNU find searches
28+
the directory tree rooted at each given starting-point by evaluating
29+
the given expression from left to right, according to the rules of
30+
precedence (see section OPERATORS), until the outcome is known (the
31+
left hand side is false for and operations, true for or), at which
32+
point find moves on to the next file name. If no starting-point is
33+
specified, `.' is assumed.
34+
...
35+
```
1336
1437
**Examples**
1538
@@ -74,7 +97,29 @@ Passing filtered files as input to other commands
7497
7598
## <a name="locate"></a>locate
7699
77-
>find files by name
100+
```bash
101+
$ locate --version | head -n1
102+
mlocate 0.26
103+
104+
$ man locate
105+
locate(1) General Commands Manual locate(1)
106+
107+
NAME
108+
locate - find files by name
109+
110+
SYNOPSIS
111+
locate [OPTION]... PATTERN...
112+
113+
DESCRIPTION
114+
locate reads one or more databases prepared by updatedb(8) and writes
115+
file names matching at least one of the PATTERNs to standard output,
116+
one per line.
117+
118+
If --regex is not specified, PATTERNs can contain globbing characters.
119+
If any PATTERN contains no globbing characters, locate behaves as if
120+
the pattern were *PATTERN*.
121+
...
122+
```
78123
79124
Faster alternative to `find` command when searching for a file by its name. It is based on a database, which gets updated by a `cron` job. So, newer files may be not present in results. Use this command if it is available in your distro and you remember some part of filename. Very useful if one has to search entire filesystem in which case `find` command might take a very long time compared to `locate`
80125

0 commit comments

Comments
 (0)