instructions/Instruction.md
Czkawka consists of several independent frontends sharing a common core library. Each frontend has its own dedicated guide:
Reference paths
Included / Excluded paths
Excluded items
*/tmp*, */.git). More flexible than excluded paths but slightly slower.Configuration vs Cache
Configuration files (per frontend, not shared):
czkawka_gui_config.txt under the user config directory.config_general.json and config_preset_N.json under the user config directory (~/.config/krokiet/ on Linux).Cache files (shared across all frontends):
Cache contains computed results (hashes, thumbnails, parsed metadata) and is shared to avoid recomputation.
Notable files:
cache_similar_image_SIZE_HASH_FILTER.bin/.json - image hashescache_duplicates_HASH.txt - duplicate file hashescache_similar_videos.bin/.json - video signaturescache_broken_files.txt - broken file check resultsJSON-format cache files can be manually edited (useful when moving a collection to a different disk or machine). To generate them, enable "Save also as JSON" in settings. By default .bin files are loaded; if missing, the .json fallback is used.
Default paths (GTK and CLI use "Czkawka" for both config and cache; Krokiet uses "Krokiet" for config but "Czkawka" for cache):
| OS | GTK/CLI Config | Krokiet Config | Cache (all frontends) |
|---|---|---|---|
| Linux | ~/.config/czkawka/ | ~/.config/krokiet/ | ~/.cache/czkawka/ |
| macOS | ~/Library/Application Support/pl.Qarmin.Czkawka/ | ~/Library/Application Support/pl.Qarmin.Krokiet/ | ~/Library/Caches/pl.Qarmin.Czkawka/ |
| Windows | %APPDATA%\Qarmin\Czkawka\config\ | %APPDATA%\Qarmin\Krokiet\config\ | %LOCALAPPDATA%\Qarmin\Czkawka\cache\ |
Override with environment variables:
CZKAWKA_CONFIG_PATH="/media/rafal/Ventoy/config" CZKAWKA_CACHE_PATH="/media/rafal/Ventoy/cache" krokiet
Portable setup script (place next to binary on a USB drive):
#!/bin/bash
CZKAWKA_CONFIG_PATH="$(dirname "$(realpath "$0")")/config"
CZKAWKA_CACHE_PATH="$(dirname "$(realpath "$0")")/cache"
./krokiet
Speedup with LTO
Add to Cargo.toml for a small performance boost and a large binary size reduction:
[profile.release]
lto = "thin" # or "fat"
Speedup with native CPU instructions
Compiling with native CPU optimizations gives a 10-20% speedup for image hashing on x86_64-v4:
RUSTFLAGS="-C target-cpu=native" cargo build --release
Or set it globally in ~/.cargo/config.toml:
[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "target-cpu=native"]
Slow cache loading
If loading cache is slow (a very large collection was scanned previously), rename or delete the relevant cache file (e.g. cache_similar_image_*.bin). The cache regenerates on the next scan with only the currently scanned entries.
Partial scanning
You can stop a scan mid-way. All computed hashes are already written to cache and will speed up the next full scan.
Prehash cache
Caches partial hashes (first and last 4 KB) of large files so re-scans only need to fully hash new or changed files. Enabled by default in Krokiet. In the CLI it must be explicitly enabled with --use-prehash-cache. Disable if the cache file size is a concern.
Cache for removable drives
Disable "Delete outdated cache entries automatically" when scanning external drives that you regularly unplug. Use "Remove outdated results" manually instead to avoid entries being evicted on disconnect.