Last active
September 27, 2015 07:34
-
-
Save tb/73dafb93c9e49085c0a3 to your computer and use it in GitHub Desktop.
mtimediff.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
#!/usr/bin/env node | |
var fs = require('fs'); | |
if (process.argv.length <= 3) { | |
console.log("Usage: " + __filename + " file1 file2"); | |
process.exit(-1); | |
} | |
var file1 = process.argv[2]; | |
var file2 = process.argv[3]; | |
fs.stat(file1, function(err, stat1) { | |
fs.stat(file2, function(err, stat2) { | |
console.log(stat1.mtime - stat2.mtime); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment