From owner-freebsd-questions Thu Dec 6 15:58: 4 2001 Delivered-To: freebsd-questions@freebsd.org Received: from freebie.atkielski.com (ASt-Lambert-101-2-1-14.abo.wanadoo.fr [193.251.59.14]) by hub.freebsd.org (Postfix) with ESMTP id 3DC6537B42F for ; Thu, 6 Dec 2001 15:57:55 -0800 (PST) Received: from contactdish (contactdish.atkielski.com [10.0.0.10]) by freebie.atkielski.com (8.11.3/8.11.3) with SMTP id fB6Nvnx11466; Fri, 7 Dec 2001 00:57:49 +0100 (CET) (envelope-from anthony@freebie.atkielski.com) Message-ID: <003401c17eb1$d0497230$0a00000a@atkielski.com> From: "Anthony Atkielski" To: "Frank Laszlo" , "FreeBSD Questions" , References: Subject: Re: Modifying only certain bits with chmod Date: Fri, 7 Dec 2001 00:57:48 +0100 Organization: Anthony's Home Page (development site) MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jason and Frank, See ftp://ftp.atkielski.com/pub/custom/nls.tar.gz Hopefully I made the tarball correctly; I downloaded it and expanded it and it looked correct. The command is still named ls; you'll need to rename it to put it alongside the standard command. I haven't changed the man page for the command, but if you just use 'p' as an option (lowercase), e.g., "ls -lp", you'll get the permissions as four octal digits instead of the usual letter expansion. I also put the tweaked version of chmod out there: ftp://ftp.atkielski.com/pub/custom/nchmod.tar.gz This tweaked version lets you specify "xxx:yyy" in the mode field; if you use this format, the one bits in the mask yyy identify which bits in xxx are to replace the corresponding bits in the file mode field, and the zero bits in the mask identify the bits in the file mode field that are to remain unchanged. Same comments as for the ls tweak above with respect to man page and command name. Neither has been exhaustively tested but they both seem to work. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message