I accidentally deleted the robot arm software on the pi. It's an easy accident to have; I typed
which will display the software on the screen.
But I'd already typed rm on the line, so the line was
rm cat robotarm.pl
which tried to delete cat (which wasn't there), then did delete robotarm.pl
Some days ago, when I started doing more than just a bit of tinkering on the pi, I set up a backup system. Each day, all the files on the pi are copied to another computer. So all I had to do was go to that computer and copy the robotarm.pl file back to the pi.
A lot of people don't have backups. Or they think they do, but have no idea whatsoever how they might get back a file they've accidentally deleted.
Are you one of those people?