Unix Trivia

Puppy related raves and general interest that doesn't fit anywhere else
Post Reply
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

Unix Trivia

#1 Post by rufwoof »

Why is the dd command called "dd" ?

.
.
.

dd = convert and copy command, but as c compile (cc) was already used it was decided to shift up the alphabet for the 'convert and copy' command.

Second video https://catonmat.net/why-unix-commands-are-short 30:40
Last edited by rufwoof on Fri 08 Nov 2019, 10:37, edited 1 time in total.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#2 Post by jafadmin »

It actually comes from the IBM Job Control Language for batch processing.
The following example, using JCL, DD is used to copy a file on OS/360:

Code: Select all

//IS198CPY JOB (IS198T30500),'COPY JOB',CLASS=L,MSGCLASS=X
//COPY01   EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=OLDFILE,DISP=SHR
//SYSUT2   DD DSN=NEWFILE,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(40,5),RLSE),
//            DCB=(LRECL=115,BLKSIZE=1150)
//SYSIN  DD DUMMY

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#3 Post by mistfire »

DD

DUPLICATE
DISK

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#4 Post by rufwoof »

Code: Select all

# dd --help
Usage: dd [OPERAND]...
or: dd OPTION
Copy a file, converting and formatting according to the operands.
.
.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#5 Post by Burn_IT »

jfadmin No it doesn't.

The DD statement in JCL stands for Data Definition and has nothing whatsoever to do with copying.

The program IEBGENER is the thing that does the copying.
SYSUT1 is the source file
and SYSUT2 is the target file
in your example.
"Just think of it as leaving early to avoid the rush" - T Pratchett

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#6 Post by musher0 »

Bump one letter up in the Latin alphabet? I see:
dd = donvert and dopy. :lol:
whatever that means! :twisted:

Following a similar reasoning, conky is actually a donkey!!! :lol: Hee-haw!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#7 Post by jafadmin »

Burn_IT wrote:jfadmin No it doesn't.

The DD statement in JCL stands for Data Definition and has nothing whatsoever to do with copying.

The program IEBGENER is the thing that does the copying.
SYSUT1 is the source file
and SYSUT2 is the target file
in your example.
https://en.wikipedia.org/wiki/Dd_(Unix)#History

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#8 Post by p310don »

I read somewhere it was data duplicate(or)

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#9 Post by Burn_IT »

Read what I said!
I said IN JCL

The dd statement in JCL is used to link a logical filename in a program to a physical data stream somewhere in the real world.
It has nothing to do with what that data is used for, though it may tell the operating system what state to leave that data in when it is finished with it.
"Just think of it as leaving early to avoid the rush" - T Pratchett

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#10 Post by jafadmin »

Burn_IT wrote:Read what I said!
I said IN JCL

The dd statement in JCL is used to link a logical filename in a program to a physical data stream somewhere in the real world.
It has nothing to do with what that data is used for, though it may tell the operating system what state to leave that data in when it is finished with it.
http://ibmmainframes.com/about9267.html


.

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#11 Post by Burn_IT »

And your point is??
In all those examples there is a program involved to do the copying.

Even if you do want to use JCL to do things like allocate space for a file or catalogue a file, you still have to have a "PGM" statement (an executable program).
The most used program for this is IEFBR14 which consists of just a return statement.

In those examples the program is the sort utility.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
01101001b
Posts: 123
Joined: Thu 09 Mar 2017, 01:20
Location: Buenos Aires, Argentina

#12 Post by 01101001b »

mistfire wrote:DD

DUPLICATE
DISK
Somewhere I read it as "disk dump" :wink:

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#13 Post by Burn_IT »

deleted as a repeat
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#14 Post by 01micko »

Digressing somewhat but still on OT..

How many know what the .tar extension stands for?

Tape Archive.

Of course if you are over 35 or so and in IT or are a coder you knew this, no? 8)
Puppy Linux Blog - contact me for access

Leon
Posts: 265
Joined: Wed 22 Jun 2005, 21:33

#15 Post by Leon »

01micko wrote:How many know what the .tar extension stands for?

Tape Archive.

Of course if you are over 35 or so and in IT or are a coder you knew this, no? 8)
Or at least 35 or so ago starting in IT and has inserting tapes in tape drives of PDP (Programmed Data Processor)...

:D

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#16 Post by Burn_IT »

I started in IT in 1966 - not that IT existed as such then.
Punch cards were the storage media most used, which led to favourite tales of Floor Sorts and Leicester Shuffles.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
Packetteer
Posts: 73
Joined: Sat 12 May 2012, 19:33
Location: Long Island Ny

#17 Post by Packetteer »

Hi All
A friend of mine Joke was that he stated that he never numbered his
punch cards. This way if they ended up on the floor he could put them back
in any order


Best Regards
John

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#18 Post by rockedge »

my very first computer program was line by line on punch cards...written in FORTRAN and ran on an IBM mainframe in 1974 at AVCO Lycoming, a gas turbine engine manufacturer. My dad was an engineer working on the AGT 1500 engine that eventually ended up in the Abrams M1A1 main battle tank.

He arranged that I could drop off the pack of cards in the correct order to the high priests (sysop's) who would at some point take my program from the queue and run it. Next day my dad brought home a printout of the results.

I was 13 years old and the program did not do much..more of a "Hello World" but it ran. Only the sysop's had direct access...the computer room was climate controlled high security area...no one could even look at it except those guys.

I later went to school to be a mainframe sysop and batch script programmer...but it was already the dawn of the new age and LAN's and the desktop computer workstation was on the horizon.

Post Reply