vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Some years back, someone, somewhere, tinkered with the standard ls program so that when files and directories were displayed, the permissions where listed in the numeric format instead of the usual rwx format. I used to have the source, don't now. Has anyone come across this altered version. ken |
| |||
| On Tue, 14 Feb 2006, No_One wrote: > Some years back, someone, somewhere, tinkered with the standard ls program > so that when files and directories were displayed, the permissions where > listed in the numeric format instead of the usual rwx format. [...] roll yer own. for example, stuff the following into a file (say, 'foo'): #!/bin/awk -f { gsub( "rwx","7", $1 ) gsub( "rw-","6", $1 ) gsub( "r-x","5", $1 ) gsub( "r--","4", $1 ) gsub( "-wx","3", $1 ) gsub( "-w-","2", $1 ) gsub( "--x","1", $1 ) gsub( "---","0", $1 ) } # the end. then, chmod +x foo ls -l | foo okay, okay, yes, sleazy, doesn't do stickybits, yada yada yada. -- William Hunt, Portland Oregon USA |
| |||
| No One wrote : > Has anyone come across this altered version. Is it this patch your searching for? <URL: http://www.mail-archive.com/bug-fileutils@gnu.org/msg01882.html> OK. it seems to be a bit old as its for version 4.1 and Slackware comes with version 5.2.1. But it ought to be possible to make a updated version of the patch. -- Thomas O. This area is designed to become quite warm during normal operation. |
| |||
| On 2006-02-14, Thomas Overgaard <thover@post2.tele.dk> wrote: > > No One wrote : > >> Has anyone come across this altered version. > > Is it this patch your searching for? ><URL: http://www.mail-archive.com/bug-fileutils@gnu.org/msg01882.html> Damn, that's it!!! Same individual! I could never remember his name. > > OK. it seems to be a bit old as its for version 4.1 and Slackware comes > with version 5.2.1. But it ought to be possible to make a updated > version of the patch. Yeah, I'm going to take a look at it first chance, probably over the weekend. Thanks... ken |
| ||||
| Just as a curiosity issue... I downloaded the patch specified, downloaded version fileutils 4.x from gnu.org applied the patch ( which failed on some minor issues related to man pages ) and compiled. renamed the newly compiled version to loc and copied to /usr/bin running loc -O produces the following output: 755 drwxr-xr-x 3 root root 496 Jan 25 05:35 . 755 drwxr-xr-x 12 root root 2440 Feb 12 04:40 .. 755 -rwxr-xr-x 1 root root 669 Sep 16 2003 setup.05.... 755 -rwxr-xr-x 1 root root 170 Feb 15 2003 setup.70.... 644 -rw-r--r-- 1 root root 3331 Jul 8 1994 text.lil.... 700 drwx------ 2 root root 48 Feb 13 16:29 tmp I thought it curious that gnu didn't adopt the -O switch, oh, well. ken |