From: "Joon Guillen" <[EMAIL PROTECTED]>
> > > Quick question: How do I chmod recursively DIRECTORIES ONLY? For
> > > example, I'd want to chmod the /usr dir and everything inside it, but
> > > ONLY the directories and not the files nor symbolic links.
> >
> > # find /usr -type d -exec chmod <mode> {} \;
>
> Excellent! Works like a charm. One more question, though: what are the
> "{}" and "\;" characters for?
$ man find
----snip---
ACTIONS
-exec command ;
Execute command; true if 0 status is returned. All
following arguments to find are taken to be
arguments to the command until an argument consisting of `;'
is encountered. The string `{}' is
replaced by the current file name being processed everywhere
it occurs in the arguments to the com�
mand, not just in arguments where it is alone, as in some
versions of find. Both of these con�
structions might need to be escaped (with a `\') or quoted
to protect them from expansion by the
shell. The command is executed in the starting directory.
> > This might not include /usr though. Please check.
>
> Yup, it includes the top directory itself. Thanks much!
>
>
> --
> Joon Guillen
>
>
> ================================
> So computers are tools of the Devil? thought Newt. He had no problem
> believing it. Computers had to be the tools of _somebody_, and he knew
> for certain that it definitely wasn't him.
>
> from "Good Omens", Neil Gaiman & Terry Pratchett
>
> _
> Philippine Linux Users Group. Web site and archives at
http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
>
> Fully Searchable Archives With Friendly Web Interface at
http://marc.free.net.ph
>
> To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]
>
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]