Out of curiosity I've decided to call cat on one of my nvme devices with the following command :
sudo cat /dev/nvme0n1p1
It started printing out gibberish but now I wonder : what data does this actually represent ? Is it data from somewhere on the disk ?
Asked
Active
Viewed 2,088 times
2 Answers
0
Thats the data that is stored on the device, in this case partition 1.
You can actually clone the device or partitions on the device using the cat
command:
cat /dev/nvme0n1p1 > /dev/sdd1
That command would clone the partition /dev/nvme0n1p1
to partition /dev/sdd1
.

dcom-launch
- 683
0
Yes it is the data from all of the partition. You could even use this for e.g. creating an image of the partition. You may test this if you have a smaller partition available, e.g. a EFI
-boot partition that often is no more than half a gigabyte.
lsblk
#nvme0n1 259:0 0 476.9G 0 disk
#├─nvme0n1p1 259:1 0 276M 0 part /boot/efi
#├─nvme0n1p2 259:2 0 70G 0 part /
#├─nvme0n1p3 259:3 0 1G 0 part
#├─nvme0n1p6 259:4 0 353.9G 0 part /data
#└─nvme0n1p7 259:5 0 11.2G 0 part [SWAP]
cat /dev/nvme0n1p1 > /data/boot.iso
mount /data/boot.iso /mnt
ls /mnt
#EFI loader 'System Volume Information'

FelixJN
- 13,566