Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


linux:shell_commands:numeric_permissions

Show numeric permissions on ls

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}'
linux/shell_commands/numeric_permissions.txt · Last modified: 2018/07/30 13:48 by tplecko