tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Problem with GS

Files with space ▻

question about chmod

In article <382c28f0.27096442@89.220.0.254>,  <fcb_666@yahoo.com> wrote:
>I want to use the chmod command in a directory with a lot off files,
>If I try to do this I always get the messages the parameter list is
>too long. How can I solve this problem ?

Use `xargs'.  For example, to make every file and directory in the
current directory group writable, you could say this.

    ls |xargs chmod g+w

To recursively make every file and directory in this directory, or any
subdirectory, inaccessible to everybody, you could say this.

    find . -print |xargs chmod 0

Tim.
--
Tim Goodwin   | "People think [ W. Gibson is ] hi-tech because his prose
Leicester, UK | is as pleasant to read as a C++ program." -- JT

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: question about chmod
Date: 12 Nov 1999 15:26:04 -0000
Organization: University of Leicester, UK
Message-ID: <80hbj2$aqh$1@ltpcg.star.le.ac.uk>
References: <382c28f0.27096442@89.220.0.254>

△ comp.unix.shell △

◅ Problem with GS

Files with space ▻