Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2008 22:11:44 +0800
From:      "Yi Wang" <wangyi6854@gmail.com>
To:        "Catalin Miclaus" <catalin@starcomms.com>
Cc:        z.szalbot@lc-words.com, freebsd-questions@freebsd.org
Subject:   Re: chmod operation on directories / files
Message-ID:  <5ea5cca50805070711k76163c85ybd047f8b18a2e836@mail.gmail.com>
In-Reply-To: <3A0AA7018522134597ED63B3B794C92A01DAE740@STA-HQ-S001.starcomms.local>
References:  <482198FA.8070708@lc-words.com> <3A0AA7018522134597ED63B3B794C92A01DAE740@STA-HQ-S001.starcomms.local>

next in thread | previous in thread | raw e-mail | index | archive | help
sorry, I forgot to reply to all.

for directorys, you can use:
chmod 755 */

if the files have a suffix. you can use
chmod 644 *.*

for the files don't have the suffix, I guess a regex should solve it.
But I'm not familiar with regex. :-)

On 5/7/08, Catalin Miclaus <catalin@starcomms.com> wrote:
> -----Original Message-----
>  From: owner-freebsd-questions@freebsd.org
>  [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Zbigniew
>  Szalbot
>  Sent: Wednesday, May 07, 2008 12:57 PM
>  To: freebsd-questions@freebsd.org
>  Subject: chmod operation on directories / files
>
>  Hello,
>
>  How do I chmod separately files and directories?
>
>  If I use chmod -R 644 then it will go through all the subdirectories
>  assigning everything 644 permissions, directories including.
>
>  Many thanks!
>
>  --
>  Zbigniew Szalbot
>  www.lc-words.com
>
>
>
>
>
> find /test -type f -exec chmod 644 {} \;
>
>  Replace /test with full path to your directory.
>  For directories use '-type d'.
>
>
>
>
>  Best Regards
>
> Catalin Miclaus
>  Network/Security ISP-Data
>  Starcomms Ltd.
>
>
>  _______________________________________________
>  freebsd-questions@freebsd.org mailing list
>  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>  To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>


-- 
Regards,
Wang Yi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5ea5cca50805070711k76163c85ybd047f8b18a2e836>