Use grep –exclude/–include syntax to not grep through certain files

Use the shell globbing syntax: grep pattern -r –include=\*.cpp –include=\*.h rootdir The syntax for –exclude is identical. Note that the star is escaped with a backslash to prevent it from being expanded by the shell (quoting it, such as –include=”*.cpp”, would work just as well). Otherwise, if you had any files in the current working … Read more

How do I list all cron jobs for all users?

You would have to run this as root, but: for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done will loop over each user name listing out their crontab. The crontabs are owned by the respective users so you won’t be able to see another user’s crontab w/o being them or root. … Read more

How do I remove the passphrase for the SSH key without having to create a new key?

Short answer: $ ssh-keygen -p This will then prompt you to enter the keyfile location, the old passphrase, and the new passphrase (which can be left blank to have no passphrase). If you would like to do it all on one line without prompts do: $ ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile] Important: … Read more

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