Is it possible when listing a directory to view numerical Unix permissions such as 644
, rather than the symbolic output -rw-rw-r--
?
Thanks.
it almost can ..
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}'