sz

A pragmatic way to view your file sizes. Think of it as an easier-to-use and more intuitive alternative to the du coreutil.

This project is still under development and might contain bugs and crappy code! Please open issues/PRs if you find something janky.

usage

Let's take a look at how we can use this utility in a directory.

bash sz .

this will be the output:

ss1

```bash file/dir name | size
---------------+--------- sz | 41.52KB

10 files parsed ```

bash sz . -l

ss2

bash sz . -l -i -g

ss3

bash sz . -l -i -g -n 30 # show me the first 30 items

bash sz . -l -i -g -L # show me all the files

bash sz . -l -d -n 5 # returns the 5 largest files in the current directory

ss5

bash sz . -l -a -n 6 # returns the 6 smallest files in the current directory

ss6

bash sz ~/Documents/rl -l -D

ss7

bash sz ~/Documents/rl -l -D -R

ss8

note that you can use all the options previously mentioned with the -D flag too.

```bash

shows the 3 largest directories in this path (including gitignored or hidden)

sz ~/Documents/rl -l -D -R -i -g -d -n 3 ```

ss9

bash sz ~/Documents/rl -l -D -R -d -e ~/Documents/rl/public/ ~/Documents/rl/assets/

ss10

warning: this arg doesn't really work with the -i or -g

bash sz ./src -l -s

ss11

options

The options are pretty simple yet powerful:

bash Options: -d, --sort-files-desc Sort items by size in descending order -a, --sort-files-asc Sort items by size in ascending order -i, --include-hidden Include hidden files -l, --list-files List the files in the directory -L, --list-all List all files in the directory even if directory count exceeds 50 -g, --include-gitignored Include gitignored files -e, --exclude-dirs <EXCLUDE_DIRS>... Directories to exclude -n, --num-files <NUM_FILES> Number of files to list -D, --only-dirs Show only directories -R, --recursive-dirs Recursively list directories (Only to be used with -D flag) -s, --show-lines Show total line count for items -h, --help Print help

Run sz -h to view this help message.