Problem with dd command I inputted the diskutil list command and the following showed up

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +120.1 GB   disk1
                                 Logical Volume on disk0s2
                                 A552902B-0850-4310-8CD2-5742F99CEF78
                                 Unencrypted

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *32.0 GB    disk2
   1:                        EFI                         209.7 MB   disk2s1
   2:       Microsoft Basic Data                         31.8 GB    disk2s2


So I tried the dd if=/Volumes/Something of=/dev/disk2 bs=1m (yes, I named the device something previously). The terminal returned Permission denied. I tried the same command with sudo. It then returned Device busy. What should I do?
Before doing dd command you need to do unmount $device and sub partitions(if any).

ie, in general

sudo diskutil unmount $device


this case

sudo diskutil unmount /dev/disk2
sudo diskutil unmount /dev/disk2s1
sudo diskutil unmount /dev/disk2s2


then you try dd command, hopes this helps

for reference https://unix.stackexchange.com/questions/271471/running-dd-why-resource-is-busy