Created
February 1, 2014 03:02
-
-
Save ybouhjira/8747362 to your computer and use it in GitHub Desktop.
This is how you call a command from node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var exec = require('child_process').exec; | |
var options = { | |
cwd : '/' | |
}; | |
exec('ls', options, function ls_function(error, stdout, stderr){ | |
console.log("ls : \n" + stdout); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment