unix tip

UNIX tip: chmod's +X option

UNIX tip: from chmod(1): “The letters ‘rwxXstugo’ select the new permissions for the affected users […one option is:] execute only if the file is a directory or already has execute permission for some user (X)”. That is, when, for whatever reason, you’ve got a whole tree of files and directories, and you can’t enter some number of sub-directories because their execute bit isn’t set, you can either execute chmod -R u+x my_dirs, or, you can (now) execute chmod -R u+X my_dirs. The former will make all the files executable (Bad™) while the latter will make only directories enterable (or, otherwise-executable files executable for you). Handy to know.

Syndicate content
bk