The queries here are designed to explore a set of nested directories, or an unknown drive, to find out how many and what kind of things they hold.
It's best to scan only the directory you want to investigate, so you don't have to specify a path filter in each query's WHERE clause. The scan will recurse down through the whole directory tree, unless you use the -maxdepth option to change this behaviour.
$ crab "/Users/johnsmith/terraIncognita/"
On macOS a file is executable if it has a appropriate permissions. You can identify which files are executable from the mode field in Crab's files table, which stores this information in a Linux-like format, 'x' indicates executable.
SELECT count(*) FROM files
WHERE type = 'f' and mode like '%x%';
Tip: Soft links aren't followed when scanning
Soft links are files which act as a placeholder for a file or directory elsewhere on the disk. This allows the same directory to appear in multiple places without taking up extra disk space.
When Crab scans a soft link, it records the soft link but not the contents of the target.
You can identify soft links from the mode field in the files table . For directories the mode starts with a lowercase L, 'l', directories have a mode that starts with a 'd', and files have a mode that starts with a hyphen '-'.
Tip: Remote filesystems are not scanned by default
A recursive scan will not include remote filesystems by default. To scan these too, use the ‑mount option when launching Crab.
Tip: If you do this often, make a Crab script
If you have a set of queries you run often, put them together into a Crab script and run it with the %read command.
We use Google and Clicky Analytics to count how many people visit, and how many come back.
For now, if you don't want a cookie, please browse in incognito mode.