I am trying to run this command from node.js file
var sys = require('sys')
var exec = require('child_process').exec;
var child1 = exec("cd: /usr/local ", function (error, stdout, stderr) {
sys.print('stdout: ' + stdout);
sys.print('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
});
It is giving me error command not found whereas all ls, pwd commands work
well
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/c979efcb-db1c-4703-9e48-a5b22bf54976%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.