The short answer is no ... there is no way to recover a file once you've done an rm.
However, I read an article once which suggested that a deleted file may be recoverable if you recognize the fact that it was deleted in error immediately. Then there may be steps you can take, but it's a long shot. I'll see if I can find it.
The most common alternative is to write (or make use of) a "recycle bin" script. This script essentially replaces the rm command.
Do a google search next time first and then don't
post to a programmers forum on a sysadmin topic.
Programmers are notoriously inaccurate on these
questions.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.