-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
searchfs.1
68 lines (68 loc) · 2.22 KB
/
searchfs.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.Dd Jun 7, 2018
.Dt SEARCHFS 1
.Os Darwin
.Sh NAME
.Nm searchfs
.Nd fast filename search on HFS+ and APFS volumes
.Sh SYNOPSIS
.Nm
.Op Fl dfespixnoh
.Op Fl v Ar mount_point
.Ar search_term
.Sh DESCRIPTION
.Nm
searches for files by name on HFS+ and APFS volumes. Searching takes place
at the driver level using the file system catalog via the low-level
searchfs() function. This means the volume's entire directory tree can
be scanned much faster than with a standard recursive directory search
using e.g. find.
.Pp
Paths of files and directories with names containing the search term are
printed to STDOUT, one path per line. Search is case-insensitive by default
.Pp
The following flags are supported:
.Bl -tag -width -indent
.It Fl v, -volume Ar path
Specify volume to search (by mount point). Default is the root file system at /.
.It Fl d, -dirs-only
Return only matching directories.
.It Fl f, -files-only
Return only matching files.
.It Fl e, -exact-match
Return only exact filename matches.
.It Fl s, -case-sensitive
Case sensitive matching.
.It Fl p, -skip-packages
Don't match file system objects that are inside a package. A package is
defined as a directory whose extension matches one of the extensions that
are configured into the kernel by Launch Services.
.It Fl i, -skip-invisibles
Don't match invisible file system objects (that is, objects with the
Finder attribute "Invisible" set) or any objects within invisible directories.
.It Fl x, -skip-inappropriate
Don't match any file system objects that are within an "inappropriate" directory.
Apple's current list of inappropriate directories contains one item: /System.
.It Fl n, -negate-params
List all file system objects that do *not* match the search criteria.
.It Fl l, --limit Ar number
Exit when a certain number of matching items have been found.
.It Fl o, -version
Print program version and exit.
.It Fl h, -help
Print usage and exit.
.El
.Sh EXAMPLES
Find directories with name matching 'something' on root volume:
.Pp
.Dl searchfs -d "something"
.Pp
Find file with the exact name 'file.txt' on volume 'SomeHD':
.Pp
.Dl searchfs -v "/Volumes/SomeHD" -e "file.txt"
.Sh SEE ALSO
.Xr find 1 ,
.Xr locate 1 ,
.Xr mdfind 1 ,
.Xr searchfs 2
.Sh AUTHORS
.An Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>