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

Network Time Protocol for CentOS 8

Check hardware clock [root@sftp testadmin]# hwclock --verbosehwclock from util-linux 2.32.1System Time: 1608158426.341727Trying to open: /dev/rtc0Using…

Ubuntu Repos (Old Info)

Add this using the Software Center deb karmic free non-free   --------------------------- Add Many Repos…

Linux Networking: Manual Configurations

Ubuntu Systems /etc/resolv.conf specifies the nameservers for resolver lookups. The order of lookup is sequential…