Your not the first to make that mistake.
It's always best to wait awhile before running terminal commands from online forums. Hopefully, someone will give a warning while you wait. You should do an internet search on the commands suggested.
When you quit the terminal session, the command goes with it.
I recommend you make a complete backup of your system. I'm cautious. In case a file isn't in your back, maybe it wasn't erases on you startup disk.
I suggest you get an external harddrive and backup your startup disk. You can then use recovery mode to reload macOS.
-1- command + r should work. power off. hold down command + r key. power on. wait to see icon.
-2- option + command + r should work. power off. hold down option + command + r key. power on. wait to see icon.
Apple's Time Machine
https://support.apple.com/en-us/HT201250
Carbon Copy Cloner will copy your startup drive to an external drive. You can boot from the external drive to verify that you have a good clone. When you upgrade your existing startup drive, you can at any time boot from your external drive and go back to your existing system.
http://www.bombich.com/software/ccc.html
SuperDuper is the wildly acclaimed program that makes recovery painless, because it makes creating a fully bootable backup painless. Its incredibly clear, friendly interface is understandable, easy to use, and SuperDuper's built-in scheduler makes it trivial to back up automatically. And it runs beautifully on both Intel and Power PC Macs!
Give SuperDuper a workout on your own system. Clone to your heart's content — for free. See what else is possible. When you're convinced that SuperDuper is a terrific solution — and a great value at $27.95 — you can register right from the application and start using its advanced features immediately!
http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.htm
----------------------------------------
I think you need to find a "better place" to read about unix.
Practical Guide to Linux Commands, Editors, and Shell Programming, A (2nd Edition) [Paperback] the book Don't be fooled by the name, the second addition includes Mac OS X.
Advanced Bash Script. premise: Examples for everything. I have revision 6.2.
tldp.org/LDP/abs/abs-guide.pdf
BASH Programming - Introduction HOW-TO
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html#toc14
Apple administrative commands
http://manuals.info.apple.com/en_US/IntroCommandLine_v10.6.pdf
Apple Shell Scripting Primer
https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/Shel lScripting/ShellScripting.pdf
Check you local library. Any book on Bash syntax will do. There will be minor differences but they will not be great.
Sometimes you can get a good deal on used books in Amazon.
Bash Cookbook, Carol Albing, JP Vossen & Cameron Newham (O'Reilly)
I know it's old, but I haven't seen an update. Look.
Mac OS X Tiger in a Nutshell: A Desktop Quick Reference (In a Nutshell (O'Reilly)) the book
*A Practical Guide to UNIX(R) for Mac OS(R) X Users* (Paperback) the bookThis is for Tiger & written in 2005.
Learning the bash Shell, Cameron Newham (O'Reilly)
Bash Cookbook, Carol Albing, JP Vossen & Cameron Newham (O'Reilly)
for Bash syntax see Advanced Bash Script. I have revision 6.2.
tldp.org/LDP/abs/abs-guide.pdf
BASH Programming - Introduction HOW-TO
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html#toc14
Sometimes you can get a good deal on used book in Amazon. Third edition.
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=013 1367366&x=0&y=00
I found the second addition of this at my local library. Any book on Bash syntax will do. There will be minor differences but they will not be great.
-------------------------------------