unix

"su - root" or "sudo" complains of incorrect password but normal root login works

If you are unable to sudo or su, there are a couple binaries that may need setuid as the root user. On Fedora, it may just be that the user you're trying to sudo/su with a user who is not in the wheel group (other distributions use the sudoers group instead of wheel).

If you're sure you user is in wheel, check permissions on the sudo and su binaries like this (you should logged in as root for doing so):

Tags: 

*nix find, exclude node_modules from list

Say you have some tests you want to run using make, and you want to find all the files in your project with .test.js in as the extension. This is typical of a Node/Express application. However, everything in node_modules ships with its own tests (or should do so :), and you probably don't want the overhead of running those tests as well. Unix find supports a number of helpful operations to let you surgically produce a list of test files to run.

Here's a quick way of getting the list without using grep (which could cause you to relinquish access to find's other operations):

Tags: