Hoffman2:Scripts:fix perms.sh
Jump to navigation
Jump to search
Use Cases
Help/Usage
$ fix_perms.sh --help
fix_perms.sh
This tool changes the permissions of any file owned by the
executing user to have group read/write/execute permissions.
Given no arguments, this permissions change is done
recursively on the current directory. Given an argument
that points to a directory that exists in the filesystem,
it will run recursively on that.
USAGE:
$ fix_perms.sh -h
or
$ fix_perms.sh --help
To see this usage message.
$ fix_perms.sh
Will recursively search the current working directory for
files owned by the executing user. Any files that do not
have group read/write/execute permissions will be given such.
$ fix_perms.sh /path/to/directory
Will recursively search the directory given as an argument
for files owned by the executing user. Any files that do
not have group read/write/execute permission will be given
such.
$ fix_perms.sh -q /path/to/directory
Will do the same changing of permissions, but suppress the
output of the find and chmod commands so that the process
happens quietly. Useful if you run this command on
directories everytime you login as a background process
and would like to not be bombarded by lines and lines
of output.