Hello and welcome to LinuxQuestions,
Have a look at TestDisk and PhotoRec
. They're the tools that you need. Most likely they're available from your repository so check with your software package manager. What version of Ubuntu are you using? It's always good practice to provide as much information as possible, the version of your distro being always required to get you started as soon as possible.
Looking forward to your participation in the forums. Have fun with Linux.