]> Sergey Matveev's repositories - glocate.git/blob - USAGE
Use database's directory for temporary files
[glocate.git] / USAGE
1 It is advisable to create a ZFS snapshot, to be sure that there are some
2 checkpoint state:
3
4     # zfs snap storage@snap1
5     $ cd /storage/.zfs/snapshot/snap1
6
7 Run the index procedure:
8
9     $ glocate -db /tmp/db -index
10
11 After that, you can print all filenames:
12
13     $ glocate -db /tmp/db
14
15 List them with sizes and mtimes in machine parseable format:
16
17     $ glocate -db /tmp/db -machine
18
19 Or in human-friendly tree-like format:
20
21     $ glocate -db /tmp/db -tree
22
23 You can limit the hierarchy with the -root:
24
25     $ glocate -db /tmp/db -root music
26     [just a music]
27
28 And you can specify glob pattern for case-insensitive match for each
29 element path, that is automatically wrapped with "*":
30
31     $ glocate -db /tmp/db -root music blasphemy | grep "/$"
32     music/Blasphemy-2001-Gods_Of_War_+_Blood_Upon_The_Altar/
33     music/Cryptopsy-1994-Blasphemy_Made_Flesh/
34     music/Infernal_Blasphemy-2005-Unleashed/
35     music/Ravenous-Assembled_In_Blasphemy/
36     music/Sect_Of_Execration-2002-Baptized_Through_Blasphemy/
37     music/Spectral_Blasphemy-2012-Blasphmemial_Catastrophic/
38
39 If you changed you dataset(s) somehow, then you should create new
40 snapshot and feed its diff to the command:
41
42     # zfs snap storage@snap2
43     # zfs diff -FH storage@snap2 |
44       glocate -db /tmp/db -update /storage/
45
46 Argument to -update is the prefix stripped from each filename of
47 diff's output.