Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


linux:shell_commands:numeric_permissions

Differences

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

Link to this comparison view

linux:shell_commands:numeric_permissions [2018/07/30 13:48] (current)
tplecko created
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: 2018/07/30 13:48 by tplecko