diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 300.1 GB disk0s2
3: Apple_HFS Restore 150.0 GB disk0s3
4: Apple_HFS Files 549.6 GB disk0s4
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +300.1 GB disk1
Physical Store disk0s2
1: APFS Volume OSX 148.6 GB disk1s1
2: APFS Volume Preboot 22.6 MB disk1s2
3: APFS Volume Recovery 506.8 MB disk1s3
4: APFS Volume VM 2.1 GB disk1s4
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.5 GB disk2
1: Apple_HFS Mac OS X Install ESD 15.5 GB disk2s1
0: FDisk_partition_scheme *15.5 GB disk2
diskutil eraseDisk jhfs+ CLE GPT disk2 ; diskutil list disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk2s2 as Mac OS Extended (Journaled) with name CLE
Initialized /dev/rdisk2s2 as a 14 GB case-insensitive HFS Plus volume with a 8192k journal
Mounting disk
Finished erase on disk2
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *15.5 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS CLE 15.2 GB disk2s2
hdiutil attach ~/Downloads/El*
sudo /Vol*/El*/Install*/C*/R*/createinstallmedia --volume /Vol*/CLE --applicationpath /Vol*/El*/Install* --nointeraction
[prompt]sudo /Vol*/El*/Install*/C*/R*/createinstallmedia --volume /Vol*/CLE --applicationpath /Vol*/El*/Install* --nointeraction
Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.
Done.
[prompt]