⚡️ nat ⚡️
What is nat?
Nat is a complete replacement for the 'ls' command
Nats features include
- Showing file permissions
- Showing file size
- Showing the date that the file was modified last
- Showing the user that the file belongs to
- Showing the group that the file belongs to
- An easy to use file search
- A splash of color to distinguish between files and folders
Join the nat discord server
Highlights
- A rather large german tech blog wrote an article about nat
Usage
Installation macOs
install the latest release from https://github.com/willdoescode/nat/releases/
then add the nat file to your path /usr/local/bin/
to alias ls to nat add
alias ls='nat'in your zshrc at ~/.zshrc
Installation Linux
Linux binary also in releases compiled using docker
apt-get install rustc cargo
cd /tmp
git clone https://github.com/willdoescode/nat.git
cd /tmp/nat
cargo build --release
cd target/release
./natTo install nat locally
cd /tmp/nat
cargo install --path .and add this line to your $HOME/.bashrc
export PATH=$PATH:$HOME/.cargo/binOn Arch Linux
yay -S nat-gitUsing nat with ls
in zshrc or bashrc
alias ls='nat'Running
nat <dir>Searching for file
nat <dir (leave empty if in wanted dir)> -f <file>To edit the code
git clone https://github.com/willdoescode/nat.git
cd natUninstall steps
rm /usr/local/bin/natUnderstanding permissions output
Imagine file permissions as three ones or zeros
000 no access
100 read
010 write
001 execute
101 read and execute
110 read and write
011 write and execute
111 read write and execute
what nat does is it combines these permissions for
user-group-other
so if the user has read write and execute and the group has read and write and other has no perms the output will look like
rwxrw----
If all groups have read write and execute the output would look like
rwxrwxrwx

