r/linux • u/javinpaul • Aug 27 '15
Learn the Command Line from codeacademy
https://www.codecademy.com/en/courses/learn-the-command-line?utm_campaign=lcl_release&utm_source=reddit16
u/EVOIXMR Aug 27 '15
mv batman.txt spiderman.txt
To rename a file, use mv with the old file as the first argument and the new file as the second argument. By moving batman.txt into spiderman.txt, we rename the file as superman.txt.
Is this a mistake? I'm not quite sure what superman.txt has anything to do with "mv batman.txt spiderman.txt"
Being new to Unix this confused me quite a bit.
20
u/bushysmalls Aug 27 '15
Seems like a typo to me.
6
u/EVOIXMR Aug 27 '15
Thanks, I googled for a half hour trying to figure out why moving one file to another renamed it a completely separate file then I just figured it must be a mistake once nothing turned up. I just wanted to make sure.
1
u/takegaki Aug 28 '15
Ah new to unix I see. It categorizes the destination file name and randomly draws things from the category. So it sees you're dealing with superheroes and randomly drew superman to be used as the new filename. This decreases the chance for a file to get overwritten due to user error.
-5
u/spiralings Aug 27 '15
Not a mistake. Is confusing.
Moving out of a file into a new one essentially deletes old and adds new
23
7
5
Aug 27 '15
I just completed this course this morning. Lots of fun. Not sure if I learned anything new but it was a nice refresher.
14
u/yakoudbz Aug 27 '15
made it in about an hour... I wanted to know if I could discover something new and I was pretty disappointed.
6
5
Aug 27 '15
Yea its awsome but field with bugs so far ... :/
I am stuck becurse the emulator won't let me type the ~ . But looks prommesing ! :)
5
11
u/darthgarlic Aug 27 '15
Why does it always come down to usernames and passwords? If they offer it for free just offer it.
34
u/vooze Aug 27 '15
That way you can continue the course on other devices.
-18
u/darthgarlic Aug 27 '15
Im not interested in continuing the course on other devices. I am however interested in my privacy.
21
u/Grammr Aug 27 '15
You can register a throwout, most people don't care that much
31
u/Kalabaster Aug 27 '15
Don't you use that logic at him, the man wants to vent. Let him freeeeeeeeeee!
1
Aug 28 '15
How is your privacy affected?
-2
u/darthgarlic Aug 28 '15
Its enough that I don't want to do it don't you think? I dont have to rationalize it to you.
2
Aug 28 '15
Sure, but then don't introduce bullshit excuses about privacy.
Yes, if you use an excuse you may be challenged on it.
0
u/darthgarlic Aug 28 '15
I don't answer to you, who the fuck are you to criticize my wants? This isn't the tin pot dictator lead Romania, we get to choose here.
2
Aug 28 '15
You're on a public forum, idiot. You post an opinion, you may get feedback on it. This isn't your personal podium to speak from, unchallenged.
Get off your high horse.
0
u/darthgarlic Aug 28 '15
Go play your games until you have a post worth posting.
2
Aug 28 '15
So .. you still fail to explain how making an account impinges on your privacy.
But at least you're pro at dodging arguments, so you got that going for you. Have a nice life.
→ More replies (0)0
u/DoTheEvolution Aug 29 '15
but if you are interested you should then seek registration, not be screamed at the moment you enter codecademy.com like they do now or even how they forcibly require you to, to even try the terminal course...
fuck them, they know what they are doing, when they were small they just gave you a user friendly course the moment you entered the site, not a huge form to register
7
u/blocky Aug 28 '15
I believe a dev posted on another thread that it is more about server resources, as in they spin up a whole instance of bash for every user and if they did this on the landing page it would take quite a lot more resources
2
u/ODE_to_maths Aug 28 '15
This is definitely the real reason, imagine the ratio of people who go to the page and people who do the course... Pretty huge I'm sure
1
Aug 28 '15
as in they spin up a whole instance of bash
Unless they changed it recently, you're really not restricted. I wonder if there's someone out there using this as a VPS. You don't get any data storage, but you get a network connection. Possibly a fast one.
1
1
u/derrickcope Aug 28 '15
I am preparing to teach this course on rpis at my son's school for an afternoon program.
1
u/NotSoVacuous Aug 28 '15
I just finished the course on CLI, and I am not exactly sure how practical the information is. Can someone give me an example of how I would use it to do something productive?
Editting the Bash_profile seems to be the only thing I felt was useful.
1
u/derrickcope Aug 28 '15
I am surprised that they offer other languages before bash. Start coding with bash and them move to python or whatever.
1
Aug 28 '15
Bash is hardly much of a programming language. I mean, it can be used as one, but I use *sh mainly interactively.
1
Aug 28 '15
for doing anything on a larger scale, you need to script
and it is a programming language
another (very) useful one is awk1
Aug 28 '15
Okay, yeah it's a programming language, but what most people use it for is interactive use.
And honestly, for anything on a large scale, I would just use python. I can use subprocess to call external utilities, but python is so much easier to write than bash.
1
u/derrickcope Aug 28 '15
it doesnt matter how much of a language it is. it is a good place to start. also it is very powerful. take a look at bashpodder and bashblog. i am waiting for a bash wm.
0
Aug 28 '15
[deleted]
9
Aug 28 '15
This looks a lot like the first lab class on Linux I made in the uni.
It needs more head, tail and cut. A pinch of awk maybe.
As a beginners' course, it did not look bad at all to me. From 0 to applying regular expressions to text files! If it's your first contact with the command line, it has to blow your mind!
2
1
u/curtis_galaxy Aug 28 '15
Yeah, I'm mostly a casual linux user and only knew some of the most basic commands, so this was a nice "getting started" course for me. I didn't at all expect this brief course to get me a job or something like that.
Actually, that's how all the Codeacademy courses are. Hopefully they'll start adding in some more advanced courses. Hopefully they'll also step up their QA; for example, the Javascript course has all sorts of misleading and incorrect information, in addition to lots of bugs, that have been reported for months but never addressed. I still completed it, but lots of times I was going to their Q&A forums for help only to discover that the problem was a bug or something in the instructions, not a problem with my understanding.
0
Aug 28 '15
[deleted]
1
u/donvito Aug 28 '15
You laugh but it's not funny. People who go through such courses for JavaScript/general webdev regularly get junior dev positions.
0
43
u/ceeant Aug 27 '15
I sure love using The Command Line™