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

74 lines
3.1 KiB
Markdown
Raw Normal View History

2020-08-27 06:49:43 +12:00
# Czkawka
Czkawka is simple and easy to use alternative to Fslint written in Rust.
It is in very early development, so most of the functions aren't added and doesn't work.
2020-09-05 09:09:11 +12:00
This is my first ever project in Rust so probably a lot of things are written in the most optimal way.
2020-08-27 06:49:43 +12:00
## Done
2020-09-02 08:48:20 +12:00
- Rich instruction with examples - CLI(`cargo run --bin czkawka_cli`)
2020-08-31 03:18:04 +12:00
- Duplicated file finding - CLI
- Including and excluding directories(absolute pathes)
2020-08-31 03:18:04 +12:00
- Option to remove files in different ways
- Fast(by size) or accurate(by hash) file checking
2020-09-02 08:48:20 +12:00
- Empty folders finding - CLI
- Advanced empty files finding(finds and remove folders which contains only empty folders)
- Option to remove all files
2020-08-27 06:49:43 +12:00
## TODO
2020-09-02 08:48:20 +12:00
- Comments - a lot of things should be described
- Tests
- Github CI
- Unit tests(if available)
2020-08-31 03:18:04 +12:00
- Duplicated file finding - CLI
- saving results to file
- support for * when excluding files and folders
2020-08-31 03:18:04 +12:00
- GUI(GTK)
- Alternative GUI with orbtk
- Finding files with debug symbols
- Support for showing only duplicates with specific extension, name(Regex support needed)
2020-08-31 03:18:04 +12:00
- Maybe windows support, but this will need some refactoring in code
2020-09-04 07:46:22 +12:00
- Translation support
2020-08-27 06:49:43 +12:00
## Usage
2020-09-02 08:48:20 +12:00
For now only Linux(and probably also macOS) is supported
- Install requirements for GTK(minimum 3.16)
```
apt install -y libgtk-3-dev
```
- Download source
```
2020-09-02 08:48:20 +12:00
git clone https://github.com/qarmin/czkawka.git
cd czkawka
```
2020-09-06 06:26:10 +12:00
- Run GTK GUI(Still WIP)
```
cargo run --bin czkawka_gui
```
2020-09-06 06:26:10 +12:00
- Run alternative Orbtk GUI(Still WIP)
```
cargo run --bin czkawka_gui_orbtk
```
- Run CLI
2020-09-02 08:48:20 +12:00
```
cargo run --bin czkawka_cli
```
## How it works?
### Duplicate Finder
The only required parameter for checking duplicates is included folders `-i`. This parameter validates provided folders - which must have absolute path(without ~ and other similar symbols at the beginning), not contains *(wildcard), be dir(not file or symlink), exists. Later same things are done with excluded folders `-e`.
2020-09-06 06:26:10 +12:00
Next, this included and excluded folders are optimized due to tree structure of file system:
- Folders which contains another folders are combined(separately for included and excluded) - `/home/pulpet` and `/home/pulpet/a` are combined to `/home/pulpet`
- Inlcuded folders which are located inside excluded ones are delete - Included folder `/etc/tomcat/` is deleted because excluded folder is `/etc/`
- Non existed directories are removed
- Excluded path which are outside include path are deleted - Exclude path `/etc/` is removed if included path is `/home/`
If after optimization there is no include folders, then program ends with non zero value(TODO, this should be handled by returning value).
2020-09-06 06:26:10 +12:00
Next with provided by user minimal size of checked size `-s`, program checks recursively(TODO should be an option to turn off a recursion) included folders and checks files by sizes and put it files with same sizes to different boxes.
Next boxes which contains only one element are removed because files inside are not duplicated.
2020-09-06 06:26:10 +12:00
Next by default also is checked hash to be sure that files with equal size are identical.
2020-08-27 06:49:43 +12:00
## License
2020-09-05 09:09:11 +12:00
Code is distributed under MIT license.