USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

A decent dd tutorial at Linuxquestions.org...

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Command Line Commands
View previous topic :: View next topic  
Author Message
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Thu May 03, 2024 7:14 pm    Post subject: A decent dd tutorial at Linuxquestions.org... Reply with quote

A decent dd tutorial at Linuxquestions.org can be found at:
http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/How_To_Do_Eveything_With_DD

Here are a few lines from the beginning of the tutorial:

The real dd command


The basic command is structured as follows:

dd if=<source> of=<target> bs=<byte size>(usually some power of 2, not less than 512 bytes(ie, 512, 1024, 2024, 4096, 8192, 16384, but can be any number.) skip= seek= conv=<conversion>.

Source is the data being read. Target is where the data gets written. If you mess up, and accidentally reverse the source and target, you can wipe out a lot of data.

Examples::

Copy one hard disk partition to another hard disk:

dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=notrunc,noerror

sda2, sdb2 are partitions. You want to copy sda2 to sdb2. If sdb2 doesn't exist, dd will start at the beginning of the disk, and create it. Be careful with order of if and of. You can write a blank disk to a good disk if you get confused.

Make an iso image of a CD:

dd if=/dev/hdc of=/home/sam/mycd.iso bs=2048 conv=notrunc

Much more at the URL noted above.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Pet3M0ss
Advanced Member


Joined: 18 Sep 2024
Posts: 738
Location: NW corner of Montana (Libby)

PostPosted: Thu May 03, 2024 11:28 pm    Post subject: Reply with quote

I think the "rescue" stuff towards the end of your link warrant further exploration. Definitely a bookmark site, masinick



_________________
Slackware 12.2
Slax
Back to top
View user's profile Send private message
JP
Linux Guru


Joined: 07 Jul 2024
Posts: 6671
Location: Central Montana

PostPosted: Fri May 04, 2024 12:44 am    Post subject: Reply with quote

Yeah, I agree. Is that the way you preserve your OS when you have it tweaked just the way you want it, so that if you crash it and have to reinstall, you can use that CD instead of starting over with the factory CD? If it is, I could definitely use that command Laughing Laughing Razz



_________________
Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
Back to top
View user's profile Send private message Visit poster's website
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Fri May 04, 2024 1:25 am    Post subject: This all came out of advanced research projects of the 60s! Reply with quote

Pet3M0ss wrote:
I think the "rescue" stuff towards the end of your link warrant further exploration. Definitely a bookmark site, masinick


There is a lot of geekiness in the dd page, but it does give you a good idea of the kind of thing that dd is capable of.

One thing the site did not provide was a history into some of the names of these commands. In the case of dd, historically this was used as a command to interact with tape drives and other peripherals. On mainframe systems from IBM, whose systems were common in the data center billing side of the house, JCL (Job Control Language) was used. A dd is a data definition card. When I say card, I literally mean that. JCL was submitted to the systems through a card reader, which accepted 80 column punched card input, the typical input medium for mainframe systems. AT&T teletype devices, commonly what were used to interact with the early UNIX systems - and the reason for the very short, terse commands, often used paper tape for both input and output, but the systems did usually have at least one magnetic tape drive as well.

The dd card describes the data set name, or dsn, the file name label, blocksize, method of file access, etc.

If you look closely at the documentation on dd, you will see an EBCDIC to ASCII conversion option, a clear indication of the mainframe to UNIX interconnectivity. In 1969, I can tell you, the main interface was 14" magnetic tape!

The reason that ed, the original text editor, ex, the BSD rewrite, which was used to build the first vi, cat, the conCATenate command, ls, the list segment command, and many others, all came from Eunuchs, or castrated versions of the great commands that were on the MULTICS system. You see, the MULTICS system was a great system that ushered in the seventies, eighties, nineties, and frankly, even today. From MULTICS (on the character device side) and IBM VM/CMS (on the synchronous channel connection side) we get almost all of the cool research that we use in computer systems today. For the graphical interfaces, virtually all of that came out of a third place, Xerox Parc, ironically enough.

So AT&T Bell Labs, Xerox Parc and IBM Research Triangle Park did probably 80-90% of the research in those days that led to the systems we have. MULTICS led to UNIX, and, believe it or not, QDOS, Dr. DOS, MS/DOS, and Windows, as well as Linux, OS X, and BSD.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Pet3M0ss
Advanced Member


Joined: 18 Sep 2024
Posts: 738
Location: NW corner of Montana (Libby)

PostPosted: Fri May 04, 2024 2:29 pm    Post subject: Reply with quote

Well, I graduated from WSU in '71. I remember registering for classes on cards that we filled in our preferences with a pencil- one card for each class.

I tried to explain a slide rule to my sons.... sigh. To think how proud I was to learn how to run the thing Smile



_________________
Slackware 12.2
Slax
Back to top
View user's profile Send private message
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Fri May 04, 2024 5:24 pm    Post subject: How things change! Reply with quote

Pet3M0ss wrote:
Well, I graduated from WSU in '71. I remember registering for classes on cards that we filled in our preferences with a pencil- one card for each class.

I tried to explain a slide rule to my sons.... sigh. To think how proud I was to learn how to run the thing Smile


If I had to use punched cards all the time, I would change professions! My first use of computers was through a teletype device. Easy to type and correct, though to save the results, all I had was punched paper tape. It was not until entering college that I first actually had to use punched cards, though I saw them in action, along with rare at that time "cathode ray tube" (CRT) in use at the GM Research Laboratories. That (the CRT) hooked me on the profession. It has been a fun ride most of the time! Wink



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
mmmna
. . . .


Joined: 21 Apr 2024
Posts: 7224

PostPosted: Sat May 05, 2024 8:50 pm    Post subject: Reply with quote

I think I might still have some rolls of unused paper punch tape, for those old Teletype terminals..... I started 'programming' using Basic back in high school, in 1975, on a SWTP 8080 based system with ... what was it... 32k RAM?

DD is one of this tools that save your life.



_________________
-Kubuntu 10.04 LTS Beta2 on Celeron D desktop
-PCLinuxOS 2024 LXDE on EeePC 900A with Atom n270 (modded with 32G SATA drive and 2G ram).
Back to top
View user's profile Send private message
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun May 06, 2024 1:50 am    Post subject: Similar timing Reply with quote

mmmna wrote:
I think I might still have some rolls of unused paper punch tape, for those old Teletype terminals..... I started 'programming' using Basic back in high school, in 1975, on a SWTP 8080 based system with ... what was it... 32k RAM?

DD is one of this tools that save your life.


I've got you beat on the date: 1973 for my first program, but YOU have ME beat on retaining those old paper tapes. If my Advanced Biology teacher is still around, he may have them for historical purposes - I wrote a Chi Square and T test simple statistical program for an Advanced Bioiogy project in 73-74, and that was the first app that I actually SAVED on paper tape, though I would occasionally retain work from one day to the next also on paper tape. We did have a small file system where we could keep a few small programs without paper tape. but it may have been 10 MB for an entire school district! Look what we'd need today - probably 10 TB for the district, 500 GB for one school, maybe 10 GB for a class and 100 MB per student or something on that order of magnitude! How things have changed!



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Command Line Commands All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse