MacOS – wacked a directory from the command line

bashcommand linemacossnow leopardterminal

I was copying a file to /usr/local/bin from the commandline on a Snow Leopard Server 10.6 … anyhow i typed the following …

sudo cp ./le /usr/local/bin

Ouch … that missed last forward slash from a bash shell screwed me. It wacked my directory with a copy of the le file renamed as bin. This is a pretty vanilla machine just used a fileshare. Any thoughts on how to recover? Noticed there is no lost+found … err, at least I didn't see it in root directory.

Best Answer

Unfortunately there is no way to recover from that, aside from restoring from a backup. Command line utilities don't have an undo command (and they don't typically delete to the Trash).

lost+found wouldn't help either, since that is only used when a filesystem recovery utility has found filesystem corruption.