this blog is girtby.net

Posted
29 December 2004

Categories
Nerd Factor X

Tags
unix tips chmod

2 Comments

UNIX tip o' the day

I never knew that the +X mode for chmod meant set the execute bit only if a directory or if the execute bit is already set on a file.

Up until now I had been using a wierd combo of chmod -R [whatever] followed by find . -type d | xargs chmod +x to reset permissions on a directory hierarchy. Now I will just use chmod -R +X.

This will save me literally seconds of typing!

2 Comments

Posted by
Garth
2004-12-29 16:39:00 -0600
#

Oh, man, I was only doing that this morning. :|


Posted by
marxy
2004-12-29 16:39:00 -0600
#

And the gnu tools keep adding really useful command line switches, two I noticed recently are the grep -r which searches recursively and tar -j that uncompresses bzip2 files.