DEV Community

csm
csm

Posted on

sz - view file size

sz

A Linux utility for viewing file sizes.

link to repo

Overview

sz displays the size of a given file in human readable format (KB,MB,GB).

Example:

sz hello.txt
Enter fullscreen mode Exit fullscreen mode
4.50 MB
Enter fullscreen mode Exit fullscreen mode

Development Environment

  • Operating System: Linux Mint
  • Rust Toolchain

Building the Project

  • clone the repo
  • cd into the cloned repo
  • to build:
cargo build --release
Enter fullscreen mode Exit fullscreen mode
  • the sz binary will be created under "target/release" folder.
  • Add the sz binary's directory to PATH to use it from anywhere in the terminal.

Commands

sz <no args>     -> Print sz commands
sz -version, -v  -> Print sz version
sz -help,    -h  -> Print sz commands
sz <file.txt>    -> Print file size
Enter fullscreen mode Exit fullscreen mode

License

MIT

Top comments (0)