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

Install Fail2ban on CentOS 7 & 8

Objective: Ban all IPs that have failed logins by matching a certain policies. Here's a…

Manually Create a SSL Certificate with LetsEncrypt

Step 1: Install certbot-auto mkdir /etc/letsencryptcd /etc/letsencrypt/wget chmod a+x certbot-auto Step 2: Create the Cert…

How to Import Files Into a Docker Container

1. Use SCP to copy files to the remote server while logged onto the local…