[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Working with permissions



On 18:54 31 May 2003, Ian Dixon <zippller optonline net> wrote:
| Thanks Bob,
| I am aware of both formats, I just wondered if you were able to display one
| or the other as default when running a ls -l command of a file, so that 
| I might
| see 664 displayed rather than -rw-rw-r-- every time I looked at a files or
| directories permissions. I see that it is not possible and appreciate 
| your help
| as always.

You can always write a very short Perl script:

	#!/usr/bin/perl
	for (@ARGV)
	{ (@s=lstat) || continue;
	  printf("%04o %s\n",$s[2]&07777,$_);
	}

Instant octal modes for the argument filenames. Hack to suit.

Cheers,
-- 
Cameron Simpson <cs zip com au> DoD#743
http://www.cskk.ezoshosting.com/cs/

all coders are created equal; that they are endowed with certain
unalienable rights, of these are beer, net connectivity, and the
pursuit of bugfixes...  - Gregory R Block




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]