> Would it be possible to add option like that to chmod:
> --filesonly
> --dirsonly

While it would be possible this is not in the philosophy of UNIX as a
modular set of commands.  The functionality you wish to use already
exists in the 'find' command.  There is no need to add it to every
other command in the operating system as well.  That would cause much
code bloat.  It would also complicate many commands and lead to more
bugs due to the added complexity.  Most commands would implement it
differently.

[My editorial remarks are that some other systems do little themselves
and mostly just launch commands.  In those systems every command
becomes a complete environment.  In those environments programs like
xtree become necessary but are rarely needed on UNIX.]

> Quite often I have to set mask 0755 for all directories 
> and 0644 for all files.
> 
> If those options were in chmod this would be easy:
> 
> chmod --filesonly  0644 *
> chmod --dirsonly  0755 *
> 
> At the moment I have to use my own aliases or find contructs.
> 
> I would be gratefull if You could include that option in chmod.

Try using the following as the more normal UNIX method of doing what
you want.

  find . -type f -print | xargs chmod 0644
  find . -type d -print | xargs chmod 0755

Bob Proulx

Reply via email to