Note: this article is about the linux shell command for reading or writing raw data from a storage device, NOT the PHP/Kint function for dumping data in a web application.
Linux systems provide a command-line interface for working with storage devices at the fundamental, data or block level of abstraction. In other words, you can copy the raw bits & bytes to make what is called a "disk image". This often comes in handy with Raspberry Pis since they have no built-in storage but use micro-SD cards for their primary storage. dd makes it easy to "clone" an SD card in order to have two RasPis running the identical system. I use this method, for example, with the three RasPis I have running Kodi, an open-source home-entertainment software system that runs on virtually anything. All of my Kodi systems share a common database which contains the library and metadata including watched status. For this to work, they all need to be running the same version. Upgrading can be tricky on the Raspberry Pi, so when I get a new version working just right, I just want to duplicate it, then change the IP and hostname of the "cloned" systems. Since the Raspberry Pi runs linux, this last step is easy. What's less easy is working with the SD cards on non-linux machines, such as a Mac (I won't even get into Windows here since I avoid it whenever possible).
Fortunately, the Raspberry Pi foundation released a GUI tool for copying disk images to SD cards which works on Mac/Linux/Win, but is only useful for WRITING sd cards from a disk image. Not helpful for what I need. On Linux, I would use the dd command, but to do this on a Mac, I use MacPorts. To install "dd", as with any other package:
$ sudo port install dd
Now connect your SD card to your Mac with some kind of card reader. Next, to create a disk image from an SD card, you need to know which device the SD card us using.
$ diskutil list
The information you're looking for is "/dev/diskX", where X is a digit like 0, 1, 2, etc. Write down the device that corresponds to your sd card, and use it below. To create the disk image. Be aware this could take several minutes and, following the classic Unix design Rule of Silence, you won't see any output from the dd command while it's running unless something goes wrong.
$ sudo dd bs=4m if=/dev/diskX of=DiskImage.img
You now have a byte-for-byte copy of your SD card which you can use to "burn" a new one. You could use "dd" for this step as well, but the Raspberry Pi Disk Imager is so nice, I generally use it for this step.