1
0
Fork 0
mirror of synced 2024-04-29 01:52:39 +12:00
Go to file
2020-10-06 21:28:04 +02:00
.github/workflows Test Windows CI (#41) 2020-10-05 22:07:21 +02:00
czkawka_cli Update version to 1.0.1 2020-10-06 21:28:04 +02:00
czkawka_core Update version to 1.0.1 2020-10-06 21:28:04 +02:00
czkawka_gui Update version to 1.0.1 2020-10-06 21:28:04 +02:00
czkawka_gui_orbtk Update version to 1.0.1 2020-10-06 21:28:04 +02:00
misc/.idea Update .idea folder to the see latest additions 2020-09-27 10:59:20 +02:00
pkgs Arch PKGBUILD (#36) 2020-10-04 23:24:10 +02:00
.gitignore Add Save system 2020-09-30 14:47:39 +02:00
.rustfmt.toml Removed almost all occurrences of println from core 2020-09-11 15:52:06 +02:00
Cargo.lock Update version to 1.0.1 2020-10-06 21:28:04 +02:00
Cargo.toml Better explanation, starting working with GUI 2020-09-03 17:33:43 +02:00
Changelog.md Update version to 1.0.1 2020-10-06 21:28:04 +02:00
Instruction.md Begin of working with finding biggest files 2020-09-25 21:05:47 +02:00
LICENSE Add license 2020-09-11 13:41:00 +02:00
README.md Updated README and changelog 2020-10-05 22:30:59 +02:00

Czkawka

Czkawka is simple, fast and easy to use alternative to Fslint, written in Rust.
This is my first ever project in Rust so probably a lot of things are not being written in the most optimal way.

Czkawka

Why?

In internet exists a lot of tools to find duplicates, empty folders, temporary files etc. but in most cases there are only available on CLI, which is hard to use by users.

GUI FSlint allows to really easy select different files and folders, but is based on old and unsupported Python 2 and GTK 2.

Other tools are mostly written in C/C++ to provide big performance but still needs to be tested a lot if not contains memory leaks, invalid memory reads/write and double frees.

But the most important thing for me was to learn Rust and create a program useful for the open source community.

Features

  • Written in fast and memory safe Rust
  • CLI frontend, very fast and powerful with rich help
  • GUI GTK frontend - use modern GTK 3 and looks similar to FSlint
  • Light/Dark theme match the appearance of the system
  • GUI Orbtk frontend(Very early WIP) - alternative GUI with reduced functionality
  • Saving results to file - allows to easily read entries found by tool
  • Rich search option - allows setting absolute included and excluded directories, set of allowed files extensions or excluded items with * wildcard
  • Clean Glade file in which UI can be easily modernized
  • Multiple tools to use:
    • Duplicates - Finds duplicates basing on its size(fast), hash(accurate), first 1MB of hash(moderate)
    • Empty Folders - Finds empty folders with help of advanced algorithm
    • Big Files - Finds provided number of the biggest files in given location
    • Empty Files - Looks for empty files across disk
    • Temporary Files - Allows finding temporary files

Usage and requirements

Requirements

For normal use of the program, the only requirements for is having GTK 3.22+.
For CLI, Orbtk on all OS and GTK GUI on Windows, there is no special requirements.

Precompiled binaries are here - https://github.com/qarmin/czkawka/releases/

You can also application with every single commit here - https://github.com/qarmin/czkawka/actions

If app not working when clicking at it, run it by terminal.

Cargo

You can really fast install Czkawka from Cargo by typing cargo install czkawka_gui

Snap, Flatpak, Appimage

Still WIP, but looking for help

AUR - Arch Linux Package

Czkawka is also available in Arch Linux AUR from which it can be simple downloaded and installed on OS.

Compilation

Requirements

Rust 1.46 - probably lower also works fine(1.40 is needed by GTK)
GTK 3.22 - for GTK backend

For now only Linux(and maybe also macOS) is supported

  • Install requirements for GTK
apt install -y libgtk-3-dev

Compilation from source

  • Download source
git clone https://github.com/qarmin/czkawka.git
cd czkawka
  • Run GTK GUI
cargo run --bin czkawka_gui

For Linux to Windows cross-building instruction look at the CI. GUI GTK

cargo run --bin czkawka_gui_orbtk

GUI Orbtk

  • Run CLI(this will print help with a lot of examples)
cargo run --bin czkawka_cli

CLI

Speed

Since Czkawka is written in Rust and aims to be a faster alternative for written in Python - FSlint we need to compare speed of this two tools.

I checked prepared before directory, without any folder exceptions(I removed all directories from FSlint and Czkawka from other tabs than Include Directory) which contained 176 056 files and 22194 folders and 88436 duplicated files in 52330 groups which took 6,2 GB.

First run reads file entry and save it to cache so this step is mostly limited by disk performance, and with second run cache helps it so searching is sometimes faster(with a small amount of duplicates is even 10x faster).

Duplicate Checker(Version 0.1.4)

App Executing Time
Fslint (First Run) 284s
Fslint (Second Run) 247s
Czkawka GUI Release(First Run) 118s
Czkawka GUI Release(Second Run) 120s

For Fslint I used Mprof and for Czkawka Heaptrack

App Idle Ram Max Operational Ram Usage Stabilized after search usage
Fslint 55 MB 160 MB 150 MB
Czkawka GTK GUI Release 8 MB 76 MB 75 MB

Differences should be more visible when using slower processor or faster disk.

Comparsion with FSLint

Czkawka FSlint
Language Rust Python
Framework GTK 3 (Gtk-rs) GTK 2 (PyGTK)
Ram Usage Low Medium
Duplicate finder X X
Empty files X X
Empty folders X X
Temporary files X X
Big files X
Installed packages X
Invalid names X
Names conflict X
Invalid symlinks X
Bad ID X
Non stripped binaries X
Redundant whitespace X
Project Activity High Very Low

Contributions

Contributions to this repository are welcome.

You can help by creating:

  • Bug report - memory leaks, unexpected behavior, crashes
  • Feature proposals - proposal to change/add/delete some features
  • Pull Requests - implementing by yourself a new feature or fixing bugs, but also important is code quality. If change is bigger, then is good to open new issue to discuss changes.

Code should be clean and pretty formatted (Clippy and fmt are required in each PR).

Code should also be easy to read so please use as much simplest language as possible without magic numbers and variables with strange names, and try to write unit tests/tests if possible.

Name

Czkawka is a Polish word which means hiccup.
I chose this name because I wanted to hear people speaking other languages pronounce it.
This name is not as bad as it seems, because I was also thinking about using words like żółć, gżegżółka czy żołądź, but I gave up these ideas because of having Polish characters, which would be a huge difficulty in searching for a project.

License

Code is distributed under MIT license.

Program is completely free to use.

"Gratis to uczciwa cena" - "Free is a fair price"