1
0
Fork 0
mirror of synced 2024-05-05 21:13:41 +12:00
czkawka/README.md

264 lines
10 KiB
Markdown
Raw Normal View History

2020-12-19 01:48:23 +13:00
![com github qarmin czkawka](https://user-images.githubusercontent.com/41945903/102616149-66490400-4137-11eb-9cd6-813b2b070834.png)
2020-09-27 19:32:44 +13:00
2020-12-24 07:35:30 +13:00
**Czkawka** is written in Rust, simple, fast and easy to use app to remove unnecessary files from your computer.
2020-10-02 03:54:26 +13:00
2020-09-27 19:32:44 +13:00
## Features
- Written in memory safe Rust
2020-12-03 00:01:30 +13:00
- Amazingly fast - due using more or less advanced algorithms and multithreading support
- Free, Open Source without ads
2021-01-15 00:17:15 +13:00
- Multiplatform - works on Linux, Windows and macOS
- Cache support - second and further scans should be a lot of faster than first
2020-12-24 07:35:30 +13:00
- CLI frontend, very fast to automate tasks
2021-01-15 00:17:15 +13:00
- GUI frontend - uses modern GTK 3 and looks similar to FSlint
- Rich search option - allows setting absolute included and excluded directories, set of allowed file extensions or excluded items with * wildcard
2020-09-27 19:32:44 +13:00
- Multiple tools to use:
2020-12-31 21:29:20 +13:00
- Duplicates - Finds duplicates basing on file name, size, hash, first 1 MB of hash
- Empty Folders - Finds empty folders with the help of advanced algorithm
2020-09-27 19:32:44 +13:00
- Big Files - Finds provided number of the biggest files in given location
- Empty Files - Looks for empty files across disk
2020-09-30 21:06:40 +13:00
- Temporary Files - Allows finding temporary files
- Similar Images - Finds images which are not exactly the same(different resolution, watermarks)
- Zeroed Files - Find files which are filled with zeros(usually corrupted)
2020-11-03 10:47:36 +13:00
- Same Music - Search for music with same artist, album etc.
2020-12-22 06:22:59 +13:00
- Invalid Symbolic Links - Shows symbolic links which points to non-existent files/directories
2021-01-13 08:06:12 +13:00
- Broken Files - Finds files with invalid extension or corrupted
2020-08-27 06:49:43 +12:00
2021-01-15 23:07:22 +13:00
![Czkawka](https://user-images.githubusercontent.com/41945903/104711404-9cbb7400-5721-11eb-904d-9677c189f7ab.gif)
2020-12-31 21:29:20 +13:00
## Instruction
You can find instruction how to use Czkawka [here](instructions/Instruction.md)
## Requirements
If you are using Windows or Mac binaries, there is no specific requirements.
Same with Appimage on Linux(except having system 18.04+ or similar).
2020-12-24 07:35:30 +13:00
But compiled GUI binaries on Linux or compiling it on your own os require to install this packages:
### Ubuntu/Debian
```
2020-12-31 21:29:20 +13:00
sudo apt install cargo libgtk-3-dev
```
### Fedora/CentOS
```
2020-12-31 21:29:20 +13:00
sudo yum install gtk3-devel glib2-devel
```
2020-10-02 20:21:27 +13:00
## Usage
2020-10-24 04:50:20 +13:00
### Precompiled binaries
Precompiled binaries are available here - https://github.com/qarmin/czkawka/releases/.
If the app does not run when clicking at a launcher, run it through a terminal.
You don't need to have any additional libraries for CLI Czkawka
#### GUI Requirements
##### Linux
For Czkawka GUI you need to have at least GTK 3.22 and also Alsa installed(for finding broken music files).
It should be installed by default on all the most popular distros.
##### Windows
`czkawka_gui.exe` extracted from zip file `windows_czkawka_gui.zip` needs to have all files inside around, because use them.
If you want to move somewhere else exe binary and open it, you need to install GTK 3 runtime from site https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases
##### MacOS
For now you need to install manually GTK 3 libraries, because are dynamically loaded from OS(Help needed to use static linking).
To install it you need to type this commands in terminal
```shell
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gtk+3
```
Next you need to go to place where you downloaded app and add executable bit
```shell
chmod +x mac_czkawka_gui
```
At the end you can open this app
```shell
./mac_czkawka_gui
```
2020-10-24 04:50:20 +13:00
### Appimage
Appimage files are available in release page - https://github.com/qarmin/czkawka/releases/
2020-10-24 04:50:20 +13:00
2020-12-31 21:29:20 +13:00
For now looks that there is a bug with this format, because it doesn't allow opening two images/files at once.
2020-12-24 07:35:30 +13:00
2020-10-06 09:30:44 +13:00
### Cargo
2020-12-31 21:29:20 +13:00
The easiest method to install Czkawka is to use Cargo command, since it basically compile an entire app, you need to install required packages from `Compilation` section
2020-10-24 04:50:20 +13:00
```
cargo install czkawka_gui
2020-12-24 07:35:30 +13:00
cargo install czkawka_cli
2020-10-24 04:50:20 +13:00
```
You can update package by typing same command.
2020-12-09 07:41:43 +13:00
### Snap
2020-12-31 21:29:20 +13:00
Snap also are available, but there is no access to external drives.
2020-12-09 07:41:43 +13:00
```
sudo snap install czkawka
```
2020-12-31 21:29:20 +13:00
Snap store entry - https://snapcraft.io/czkawka
Edgy builds are build for every commit, but it may be a little unstable(very rarely, because I'm not pushing untested code).
2020-12-09 07:41:43 +13:00
2020-12-16 23:20:42 +13:00
### Flatpak
2020-10-24 04:50:20 +13:00
Maybe someday
2020-10-24 04:50:20 +13:00
### Debian/Ubuntu repository and PPA
2020-11-03 10:47:36 +13:00
Tried to set up it, but for now I have problems described in this issue
2020-10-06 09:30:44 +13:00
2020-10-24 04:50:20 +13:00
https://salsa.debian.org/rust-team/debcargo-conf/-/issues/21
2020-10-06 09:30:44 +13:00
2020-10-24 04:50:20 +13:00
### AUR - Arch Linux Package (unofficial)
Czkawka is also available in Arch Linux's AUR from which it can be easily downloaded and installed on the system.
```
yay -Syu czkawka-git
```
2020-10-06 09:30:44 +13:00
2020-10-24 04:50:20 +13:00
This is unofficial package, so new versions will not be always available.
### Devel versions
Artifacts from each commit you can also download here - https://github.com/qarmin/czkawka/actions
2020-10-02 20:21:27 +13:00
## Compilation
### Requirements
2020-12-31 21:29:20 +13:00
Rust 1.48 - Czkawka aims to support only the latest stable Rust version
GTK 3.22 - only for GTK backend
2020-12-31 21:29:20 +13:00
If you want to compile CLI frontend, then just skip lines which contains `gtk` word.
#### Debian/Ubuntu
```shell
sudo apt install -y curl # Needed by Rust update tool
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Download the latest stable Rust
sudo apt install -y libgtk-3-dev libasound2-dev
```
2020-12-31 21:29:20 +13:00
#### Fedora/CentOS/Rocky Linux
```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Download the latest stable Rust
sudo yum install gtk3-devel glib2-devel alsa-lib-devel
```
#### MacOS
You need to install Homebrew and GTK Libraries
```shell
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install rust gtk+3
```
2021-01-12 00:26:03 +13:00
### Windows(Not working yet)
First you need to install Visual C++ components from Visual Studio installer - https://visualstudio.microsoft.com/downloads/
Next install Rust from site https://rustup.rs/
After that the latest GTK 3 runtime must be installed from https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases
2020-10-06 09:30:44 +13:00
### Compilation from source
- Download the source
```
2020-09-02 08:48:20 +12:00
git clone https://github.com/qarmin/czkawka.git
cd czkawka
```
2020-10-02 08:29:40 +13:00
- Run GTK GUI
```
cargo run --bin czkawka_gui
```
For Linux-to-Windows cross-building instruction look at the CI.
2020-12-31 21:29:20 +13:00
![GUI](https://user-images.githubusercontent.com/41945903/103371136-fb9cae80-4ace-11eb-8d72-7b4c8ac44260.png)
2020-09-27 19:32:44 +13:00
- Run CLI(this will print help with a lot of examples)
2020-09-02 08:48:20 +12:00
```
cargo run --bin czkawka_cli
```
2020-09-21 04:53:53 +12:00
![CLI](https://user-images.githubusercontent.com/41945903/93716816-0bbcfd80-fb72-11ea-8d31-4c87cc2abe6d.png)
## Benchmarks
2020-10-24 04:50:20 +13:00
Since Czkawka is written in Rust and aims to be a faster alternative to FSlint (written in Python), we need to compare the speed of these tools.
2020-12-31 21:29:20 +13:00
I tested it on SSD Disk 256 GB GoodRam and i7 4770 CPU.
I prepared a directory and performed a test without any folder exceptions(I removed all directories from FSlint and Czkawka from other tabs than Include Directory) which contained 229868 files which took 203,7 GB and 13708 duplicates files in 9117 groups which took 7.90 GB.
2020-11-03 10:47:36 +13:00
Minimum file size to check I set to 1 KB on all programs
| App| Executing Time |
|:----------:|:-------------:|
| FSlint 2.4.7 (Second Run)| 86s |
| Czkawka 1.4.0 (Second Run) | 12s |
2020-12-09 07:41:43 +13:00
| DupeGuru 4.0.4 (Second Run) | 28s |
2020-10-24 04:50:20 +13:00
2020-10-24 04:50:20 +13:00
I used Mprof for checking memory usage FSlint and Dupeguru, for Czkawka I used Heaptrack.
To not get Dupeguru crash I checked smaller directory with 217986 files and 41883 folders.
| App| Idle Ram | Max Operational Ram Usage | Stabilized after search |
2020-10-02 08:29:40 +13:00
|:----------:|:-------------:|:-------------:|:-------------:|
| FSlint 2.4.7 | 62 MB | 84 MB | 84 MB |
| Czkawka 1.4.0 | 9 MB | 66 MB | 32 MB |
| DupeGuru 4.0.4 | 80 MB | 210 MB | 155 MB |
2020-10-24 04:50:20 +13:00
2020-12-31 21:29:20 +13:00
Similar Images which check 332 files which takes 1,7 GB
2020-10-24 04:50:20 +13:00
| App| Scan time |
|:----------:|:-------------:|
2020-12-09 07:41:43 +13:00
| Czkawka 1.4.0 | 58s |
| DupeGuru 4.0.4 | 51s |
2020-10-24 04:50:20 +13:00
2020-12-31 21:29:20 +13:00
Similar Images which check 1421 image files which takes 110,1 MB
2020-10-24 04:50:20 +13:00
| App| Scan time |
|:----------:|:-------------:|
2020-12-09 07:41:43 +13:00
| Czkawka 1.4.0 | 25s |
| DupeGuru 4.0.4 | 92s |
2020-10-24 04:50:20 +13:00
So still is a big room for improvements.
## Comparsion other tools
| | Czkawka | FSlint | DupeGuru |
|:----------:|:-------------:|:-----:|:---:|
2020-12-09 07:41:43 +13:00
| Language | Rust| Python | Python/Objective C |
2021-01-12 00:26:03 +13:00
| OS | Linux, Windows, Mac | Linux | Linux, Windows, Mac|
2020-10-24 04:50:20 +13:00
| Framework | GTK 3 (Gtk-rs)| GTK 2 (PyGTK) | Qt 5 (PyQt)/Cocoa |
2020-12-09 07:41:43 +13:00
| Ram Usage | Low | Medium | Very High |
2020-10-24 04:50:20 +13:00
| Duplicate finder | X | X | X |
| Empty files | X | X | |
| Empty folders | X | X | |
| Temporary files | X | X | |
| Big files | X | | |
| Similar images | X | | X |
| Zeroed Files| X | | |
| Music duplicates(tags) | X | | X |
2020-12-22 06:22:59 +13:00
| Invalid symlinks | X | X | |
2021-01-13 08:06:12 +13:00
| Broken Files | X | | |
2020-10-24 04:50:20 +13:00
| Installed packages | | X | |
| Invalid names | | X | |
| Names conflict | | X | |
| Bad ID | | X | |
| Non stripped binaries | | X | |
| Redundant whitespace | | X | |
| Multiple languages(po) | | X | X |
2021-01-15 00:17:15 +13:00
| Cache support | X | | X |
2020-10-24 04:50:20 +13:00
| Project Activity | High | Very Low | High |
2020-10-02 19:58:02 +13:00
## 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 a new feature yourself or fixing bugs, but you have to pay attention to code quality. If the change is bigger, then it's a good idea to open a new issue to discuss changes.
2020-12-31 21:29:20 +13:00
- Documentation - There is [instruction](instructions/Instruction.md) which you can improve.
2020-10-02 19:58:02 +13:00
The code should be clean and well formatted (Clippy and fmt are required in each PR).
2020-10-02 19:58:02 +13:00
2020-09-30 21:06:40 +13:00
## Name
Czkawka is a Polish word which means _hiccup_.
2020-12-22 06:22:59 +13:00
2020-12-31 21:29:20 +13:00
I chose this name because I wanted to hear people speaking other languages pronounce it.
2020-12-22 06:22:59 +13:00
This name is not as bad as it seems, because I was also thinking about using words like _żółć_, _gżegżółka_ or _żołądź_, but I gave up on these ideas because they contained Polish characters, which would cause difficulty in searching for the project.
2020-09-27 19:32:44 +13:00
2020-10-24 04:50:20 +13:00
At the beginning of the program creation, if the response concerning the name was unanimously negative, I prepared myself for a possible change of the name of the program, but the opinions were extremely mixed.
2020-08-27 06:49:43 +12:00
## License
2020-09-05 09:09:11 +12:00
Code is distributed under MIT license.
2020-09-30 21:06:40 +13:00
2020-12-18 04:56:36 +13:00
Icon is created by [jannuary](https://github.com/jannuary) and licensed CC-BY-4.0.
2020-12-22 06:22:59 +13:00
Windows dark theme is used from AdMin repo - https://github.com/nrhodes91/AdMin with MIT license
2020-09-30 21:06:40 +13:00
Program is completely free to use.
"Gratis to uczciwa cena" - "Free is a fair price"
## Dotations
If you are using the app, I would appreciate a donation for its further development - https://github.com/sponsors/qarmin.