NEF includes an embedded, full size, jpeg copy. Roughly equivalent to exporting using the “basic” (lower quality setting, 85% jpeg-quality). This jpeg contains no metadata though (it could be re-injected from the source NEF).
According to this blog post D200 produce exactly the same images (basic conversion vs embedded); my tests on a D60 show some difference (e.g. the image is slightly cropped).
Extraction of embedded jpg:
$ exiftool -b -JpgFromRaw image.nef > image.jpg
Copy of exif data:
$ exiftool -TagsFromFile source.nef target.jpg
Alternatively:
$ exiv2 ex -e e source.nef # Extraction * $ mv source.exv target.exv # Names must match $ exiv2 in -i e target.jpg # Injection
$ exiftool -exif -b source.nef > target.exv
Comparison of images:
$ compare -metric MSE source1.jpg source2.jpg diff.png
Also useful metric: PSNR
Maker-specific extra detailed information (Lens model, shutter count, focus mode…):
$ exiftool -nikon FILE.NEF|FILE.JPG
Extraction of ICC profile (In-camera files don't include them, at least on the D60; RAW processing software usually does embed them):
$ exiftool -icc_profile -b FILE.JPG > profile.icc
Insertion of ICC profile (Required for embedded JPGs shot in AdobeRGB –Nikon's color mode II–):
$ exiftool '-ICC_Profile<=InputFile.icc' FILE.JPG