You can use foremost. You might have to adjust the .conf file for the file type you want to recover, but there are many default types you can just specify on the command line. Foremost will find the files, and put them in the specified directory.
[linux@sam] # foremost -d -v -q -b 1024 -k 1024 -o ~/rescued_files -t jpg -t doc -t txt -t pdf -i /dev/sda3
This command line is read from left to right:
-d use indirect blocking
-v verbose output
-q quick mode (only searches the beginning of each sector for header bytes)
-b block size (ram dependent)
-k chunk size in MB (ram dependent, about 1/2 total ram is good)
-o directory to store recovered files
-t file types to be recovered (in this example: JPEG, MS Word, Portable Document Format, and text)
-i input file (place to look for files to recover)
If your looking for a weird file type, you can find the header bytes from an existing file of that type, like so:
dd if=file_name count=1 | hexdump -C | less
and look at the first four bytes. Then, make your entry in foremost.conf. You'll have to read the man page for more information. But the default file types are usually adequate.