¿ªÔÆÌåÓý

UNIX files and dd, Re: [HP-Agilent-Keysight-equipment] Agilent 54831M


 

On 10/12/20 11:12 PM, Bostonman wrote:
I apologize ahead of time, but I lack experience with Linux, so these commands are confusing me.
The file was downloaded as a .zip, but it contains a file with the extension of .dd. Any 'dd' commands I find seem geared towards using a .iso file to make a bootable drive.
Currently I'm using a Raspberry Pi with a SSD drive connected through a USB adapter.
I looked at the link above, but it doesn't make sense to me. One article stated I need to set the block size, and others have extensively long command lines.
So? I remain baffled at how to handle this.
First, it's important not to overcomplicate things. From your statements I assume you're coming from the Windows world. In the Windows world, it's common to have one or more programs designed to accomplish a specific task and those programs store data in closed, proprietary formats, creating files that will only work with that specific program. If you've got a dozen programs that all accomplish the same task, they'll each use their own format.

The UNIX world is much, much simpler than that. Sure, locked-in file formats do exist, but they are not the norm with common UNIX utilities.

The "dd" program does not have a file format. It copies bytes from one place to another. If you tell it to move bytes from a hard disk drive (not a FILE on a hard disk drive, but from the drive itself), and put them into a file on another hard disk drive, the resultant file will contain a byte-for-byte copy of whatever was on the source hard disk. This is commonly referred to as a "disk image".

The .ISO file format is poorly-named and largely misunderstood. There is no such thing as "an ISO file". ISO refers to the ISO-9660 file format, which is an on-disk filesystem layout intended for use with optical media. There are many such filesystems, but ISO-9660 is very common on optical media. When you make a disk image file (see paragraph above) of a CD-ROM drive, that would be considered to "be an ISO"...whether that CD-ROM originally contained an ISO-9660 filesystem or not. This is typical American terminological laziness at work, and it leads to confusion.

Next, file naming...Another important thing to understand about the UNIX world is that file extensions have no meaning to the system, only to humans. Windows makes a lot of assumptions about the contents of a file based on its extension, but in a UNIX-based OS, there's nothing special about the "." character, and there's nothing special about what may or may not come after it in a filename. Someone having called your file "<filename>.dd" means nothing to the system, and is not used by the system in any way, but it gives me (and soon, you) a clue as to how the file was created if the guy you got it from didn't tell you.

It would be useful for you to learn what the "dd" program does and what it's all about. If you understood it, you would see the "instructions" you found online and immediately see how they would apply to your situation, although they were (poorly) written to focus on "ISOs" of CD-ROM disks. The "dd" program copies bytes between sources and destinations. Sources and destinations can be hard disk drives, CD-ROM drives, floppies, USB thumb drives, files on a disk...anything.

The "dd" program has a lot of options to manipulate data in different ways. Sometimes the block size is important, but a lot of the time it isn't. Most of the time (but not all) it just tells dd to "read or write the data in chunks this big". For some types of devices it's important, for most it isn't, and for files on a drive it means nothing at all...EXCEPT things generally go a whole lot slower if you use a block size of 1 byte, which is the default unless you tell dd otherwise.

I realize learning this is actual work, but this is a give a man a fish/teach a man to fish situation. If you do any amount of "real" computing, you will use this information over and over again. The whole world works this way. The important thing to keep in mind is that UNIX is nothing at all like Windows...do not make any assumptions based on your Windows experience.

-Dave

--
Dave McGuire, AK4HZ
New Kensington, PA

Join [email protected] to automatically receive all group messages.