Introduction
We use exec to run commands on the computer's shell from a Node.js program. This helps us automate tasks or get system info.
You want to list files in a folder from your Node.js app.
You need to run a system command like checking disk space.
You want to automate running scripts or tools outside Node.js.
You want to get the output of a shell command to use in your program.