Posted On August 3, 2021

Useful Linux Command Aliases

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Useful Linux Command Aliases
# Create an alias command lsn to display files with numerical representation of schmod permissions
alias lsn="stat -c '%a %n' *"

# ls with numerical chmod permissions
ls -l|awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf("%0o ",k);print}'

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Linux: How to Find USB Thumb Drive via CLI

0. Trigger SCSI Device Scans # Scan all SCSI host controllers # If a new…

Creating a RAM Disk on a Linux Instance of AWS

This information has already been conveyed in another post regarding a method to overcome MySQL…

Linux: How to Add a Line into Crontab from Command Line

The easy method: newline=@reboot /usr/bin/numlockx(crontab -l && echo "$newLine") | crontab - Alternative (longer version)…