#chmod #cli #calculator #valus #rwxrw-r-x #chmod-calcuator

bin+lib chmod_calculator

A tool for calculating chmod octal values and rwx style valus

1 unstable release

Uses new Rust 2024

new 0.1.0 May 21, 2025

#1576 in Command line utilities

GPL-2.0-or-later

14KB
214 lines

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.

No runtime deps