From: Marc Heiler Date: 2011-08-20T03:52:39+09:00 Subject: Accidentally killing coreutils - an idea to use ruby? Lately I managed to kill all binaries that typically belong to coreutils. (Also had no net available on that machine and no backup) I.e. rm cp sleep echo touch etc... were all suddenly unavailable. I managed to recover thanks to busybox. So everything is fine. BUT, that got me thinking... Ruby still worked nicely and the tasks such as "mv", "cp" etc.. work in pure ruby too. Now here is my fairly odd question - when I run something like "./configure" and it is checking for something like "cp", and if it can not find it, it will state "cp: command not found", or something, is there a way to somehow use ruby instead of that? For example, "cp" could perhaps be a ruby file and inside that file could be require 'fileutils' FileUtils.cp Would that work? Additionally, would there be a way to completely control all aspects of system() from within a script, so that I could associate something like "cp" with a specific action using ruby code instead? Yeah, I have fairly weird ideas sometimes. :-) And no, I have not tested anything yet... but I figure that if ruby is working somewhere, one could perhaps use pure ruby anyway ... at least for the basic file operations. -- Posted via http://www.ruby-forum.com/.