Skip to main content

Posts

Showing posts from July, 2015

lsn

Added alias lsn="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}'" to my .bashrc and now I can view unix file permissions as numbers via `lsn`: $ lsn total 17 644 -rw-r--r-- 1 brent Administ 21655 Apr 18 2014 default.php 755 drwxr-xr-x 17 brent Administ 0 Apr 18 2014 files 644 -rw-r--r-- 1 brent Administ 11082 Apr 18 2014 settings.php