code: function which(cmd, options, callback) {
          var child = exec('which ' + cmd, options || {}, function (err, stdout, stderr) {
              if (stdout) {
                  stdout = stdout.replace(/(\r|\n)/, '');
              }
              return callback && callback(err, stdout, stderr);
          });
      }
docs: which command (man which)
  
  @memberof cmd
  @method
  @param {String} cmd command name
  @param {Object} options child_process#exec options
  @param {function} callback