Angela Yu Xcode 12 Course - Part 17 (lectures 172 to 174)

So I'm back on the beach in RAK! *Also, yesterday's entry was supposed to be part 16, not 15 again -  hence why we're now at 17. That many parts is a good, solid effort! Right - today I'm focusing on the command line terminal. I know that there is a command button on the keyboard and that it opens up certain shortcuts. But that's about it! So let's just focus on that for today. Possibly going to have a look at the Bitcoin tracker challenge later! *Also it's pretty windy here but I'm not so concerned about the screen - I have to get that replaced soon anyway. 

Start Time - 12:31

Command Line Terminal

The bash shell - analogy here is with a pistachio nut...

Mac OS is the nut. The kernel is the actual core, what is used for the programming. The shell is the user interface - how you interact with the programme.

Command Line - alternative way of interacting with the kernel!

Bash - Bourne Again Shell! This is a CLI - command line interpreter for the UNIX system. LINIX is a UNIX system. Right this is separate from Windows.

Why is it useful? Apparently for other projects and apps etc.  It gives GREATER CONTROL. It's all about exerting more power over your tools. Easier and faster to do common things using the command line tool.

This looks cool, like a new skill to my portfolio! And the key thing will be to use it regularly.

Apple typically hides various folders and things from the 'common user'. Hidden folders can be created - that is cool! Yes Angela, you have sold me on using this and having it as another tool!


So I have opened Terminal. Of course I am a bit familiar with this through the Clima project. It does say 'bash' on the title bar. You can change the skin to alter the colours etc. I like the green and black combination so will keep it at that.

ls - LIST

So where the terminal program accesses, it is in the 'User' folder for me.

 

cd - change directory.

It uses auto complete so e.g. after do I will type a w then it has to be downloads.

Right so a neat trick is to click and drag the folder that you want to access, rather than type out the exact file path. COOL! The entire path is then printed on to the terminal. That is neat.

cd .. - this takes us BACK a level!
*This is cd followed by a space then the .. (no spaces between the dots). So this is better than specifying the whole file path. Makes sense.

Another neat trick - to edit something in the command line, hold on to alt, then the plus sign comes up, then you can navigate to where you want to edit something. Better than just going back with the back arrow!

Control and a - goes to the start of the command line
Control and e - end of the line!
Control and u - deletes the line so it does not execute it and wipes it.

Shortcut website for the command lines -

https://github.com/0nn0/terminal-mac-cheatsheet

OK last bit now...

Directory and File Manipulation

OK I've found a snag - I've tried going to mkdir with a new folder but permission denied! Let's just see if I can find anything online cos nothing in the q&a...

YES! All working now.

Creating a file in the directory - touch/name of file/file type!

Using rm is for remove! using rm * removes all!

Ok because this is powerful you have to be careful! The good thing is you can't remove a directory/folder containing multiple files easily!
Destructive commands - JUST BE CAREFUL WITH!!!

Finish Time - 13:21 (50 minutes)

What a great couple of sessions! I loved learning about Command Line Terminal and am already well on board with this. That will do for now. Maybe bitcoin tracker challenge later!

Comments

Popular posts from this blog

*Xcode Project Entry 2* F1 Quiz - part 1

Angela Yu Course Part 10 (up to lesson 112)

Angela Yu Xcode 12 Course - Part 7 (lectures 74 to 79)