Chmod recursively

You can use chmod with the X mode letter (the capital X) to set the executable flag only for directories. In the example below the executable flag is cleared and then set for all directories recursively: ~$ mkdir foo ~$ mkdir foo/bar ~$ mkdir foo/baz ~$ touch foo/x ~$ touch foo/y ~$ chmod -R go-X … Read more

find without recursion

I think you’ll get what you want with the -maxdepth 1 option, based on your current command structure. If not, you can try looking at the man page for find. Relevant entry (for convenience’s sake): -maxdepth levels Descend at most levels (a non-negative integer) levels of direc- tories below the command line arguments. `-maxdepth 0′ … Read more

grep without showing path/file:line

No need to find. If you are just looking for a pattern within a specific directory, this should suffice: grep -hn FOO /your/path/*.bar Where -h is the parameter to hide the filename, as from man grep: -h, –no-filename Suppress the prefixing of file names on output. This is the default when there is only one … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)