blob: 8fb62772fc08873a8553b1f496bca91ce706359b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# ๐ฆ Rust folder size cli tool
A fast and lightweight folder analyzer written in Rust.
Recursively calculates the size of directories and files, with support for:
- ๐ Symlink resolution
- ๐๏ธ Per-directory size breakdown
- ๐ Configurable depth limit
## ๐ ๏ธ Features
- ๐ Recursively sums up file sizes in a given directory
- ๐ Outputs total size in bytes, KB, MB, and GB
- ๐ Optional symlink following (`--symlink`)
- ๐งฑ Shows size of each file or folder (`--directory-b`)
- โฌ๏ธ Limit recursion depth (`--depth-limit <n>`)
## ๐ Usage
```bash
cargo run -- [OPTIONS]
```
๐ง Options
Flag Description
--symlink: Follow and resolve symlinks
--directory-b: Print size breakdown for each directory/file
--depth-limit n: Limit recursion depth (default: 10)
๐ Example
```
cargo run -- --symlink --directory-b --depth-limit 5
```
๐งช Sample Output
symlink: true
directory_breakdown: true
depth_limit: 5
../../folder_size
โโโ bin/ (2.1 MB)
โโโ lib/ (490.6 MB)
โโโ LICENSE.txt (11 KB)
โโโ README.md (5 KB)
Total size: 492.3MB
๐ฆ Dependencies
clap โ command-line argument parser
Install them automatically with:
```
cargo build
```
๐ License
MIT License
Made by ven โ Rust beginner
|