Friday, October 8, 2004

In my continued quest to run with least privileges on my WinXP box, I needed to change security on all files in my Cygwin home directory. So I looked into using find to do it. I wanted to change all files (not directories) to not be executable. I read the man page for find and after getting more confused ;) I googled for info on find and found a good tutorial on how to use it. I ended up using the following command from the root of my home directory:

find . -type f -exec chmod -v uga-x {} ;

The part that was triping me up was the backslash to escape the semicolon, without the backslash, the shell was eating the semicolon and not passing it on to find and find was giving me an error that the exec parameter was incomplete.

Here is the web site with some good info on find:

Linux Magazine: A Very Valuable Find

No comments:

Post a Comment