chmod_calculator 0.1.0

A tool for calculating chmod octal values and rwx style valus
Documentation
  • Coverage
  • 66.67%
    4 out of 6 items documented4 out of 5 items with examples
  • Size
  • Source code size: 19.46 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • pilkch/chmod-calculator
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • pilkch

chmod-calcuator

Basic chmod calculator. Can convert between octal 0755 style and rwxr-xr-x style and can print a table of the permissions.

Building

Install dependencies:

sudo dnf install rust cargo

Build everything:

cargo build

Tests

cargo test

Usage

$ ./chmod-calculator 765
rwxrw-r-x
$ ./chmod-calculator 0765
rwxrw-r-x
$ ./chmod-calculator rwxrw-r-x
765
$ ./chmod-calculator --table 765
        Owner  Group Other
Read    x      x     x
Write   x      x
Execute x            x

Rationale

I kept going to chmod-calculator.com to convert to/from '0755' style permissions in ansible, but I always have a terminal open in VSCodium, so I thought why don't I just do it there? And I wanted an excuse to mess around with rust.