In the terminal (command line) there is no "undo" or trash function. But the files are still--in principle--recoverable. The important thing is to not do anything that would write to the disk.
What is the file system?
Search here and on Google using "file recovery" + maybe "linux" and the name of the filesystem---eg: "Linux ext3 file recovery"
Here is one package that I hear a lot about
(The author recently joined LQ)