Re: chmod-ing a directory tree without effecting files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 22 October 2003 06:50 pm, Thomas Smith wrote:
> I need to chmod a directory tree to change the permissions on the
> directories but not the files they contain.
>
> Is there a way to do this with chmod or another tool?

Something like:
find /path/to/directory -type d -exec chmod 775 "{}" \;

Or, if you want to be prompted before each chmod command is executed:

find /path/to/directory -type d -ok chmod 775 "{}" \;

Hope that helps,
- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.{2,3}|8.0|9 in 8M of RAM: http://www.rule-project.org/en/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD4DBQE/lxF6n/07WoAb/SsRAlryAJiPii1yMJJ3Qxv87mOG8PmgHj+xAJwP1YSC
ODHR4IHTfgQtBJ90Mylmfw==
=+Qd0
-----END PGP SIGNATURE-----


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux