linux:shell_commands:numeric_permissions

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


linux:shell_commands:numeric_permissions [2019/10/31 09:05] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Show numeric permissions on ls ======
 +<code bash>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}'</code>
  
  • linux/shell_commands/numeric_permissions.txt
  • Last modified: 2019/10/31 09:05
  • by 127.0.0.1