1 00:00:06,950 --> 00:00:12,530 In the previous lesson, we saw how to do some of the basic Linux command line commands. 2 00:00:12,920 --> 00:00:15,280 We saw LCD, you name in history. 3 00:00:15,590 --> 00:00:17,870 Let's do a couple of file based commands. 4 00:00:17,990 --> 00:00:20,360 So switch back over to your Linux command line. 5 00:00:21,490 --> 00:00:27,310 Let's start by changing directories to our home directory CD space and then enter that takes us up to 6 00:00:27,310 --> 00:00:27,780 our home. 7 00:00:28,270 --> 00:00:34,590 And now let's change directories to our desktop CD space, desktop. 8 00:00:34,600 --> 00:00:34,930 Good. 9 00:00:35,320 --> 00:00:36,820 And we can use the tab there. 10 00:00:37,720 --> 00:00:41,240 And let's use our ability to make a directory. 11 00:00:41,260 --> 00:00:46,960 Let's make the ah, we'll make a directory called Blah is fine. 12 00:00:48,760 --> 00:00:53,380 And if we move just a little bit here, move our window over, you'll see a folder just popped up, 13 00:00:53,650 --> 00:00:56,470 a new directory or folder called blah. 14 00:00:57,370 --> 00:01:08,620 And if I remove that with R.M. Dear and I hit tab that Blofeld or disappears, so I might have to make 15 00:01:08,620 --> 00:01:09,550 a file called. 16 00:01:13,220 --> 00:01:19,820 My files and we see that my files appears over here, I can copy into my files. 17 00:01:22,670 --> 00:01:25,780 And do unless it's empty right now, but that's OK. 18 00:01:28,120 --> 00:01:30,850 Let's say that we wanted to create a file in there. 19 00:01:31,930 --> 00:01:32,630 Let me clear. 20 00:01:33,940 --> 00:01:41,950 So I'm in my desktop, my files, I could echo some text out to a file and go text into. 21 00:01:45,130 --> 00:01:46,720 Blog, text. 22 00:01:47,870 --> 00:01:54,260 And this little greater than symbol allows me to echo something or type something into a file, and 23 00:01:54,260 --> 00:02:00,890 I've decided to file it, I've redirected this weird text into a file called Blue Dot Text. 24 00:02:02,130 --> 00:02:11,540 I can use the more command to more Balada text and notice, I just have to do buyable tab and it tells 25 00:02:11,540 --> 00:02:13,780 me that it has some text in it. 26 00:02:14,240 --> 00:02:16,820 In fact, if I surf up here to my my files. 27 00:02:18,160 --> 00:02:24,220 I can see blood text is in there and I'll open it up in my text editor and there's my text, pretty 28 00:02:24,220 --> 00:02:24,540 cool. 29 00:02:24,550 --> 00:02:28,030 So we've created a text file from the command line. 30 00:02:28,330 --> 00:02:33,330 So if we list now, we can see the text is there. 31 00:02:33,670 --> 00:02:36,430 Well, let's say we didn't want to name it black text. 32 00:02:36,430 --> 00:02:40,330 We meant to name it my file, that text. 33 00:02:40,870 --> 00:02:42,910 We could either copy that. 34 00:02:43,720 --> 00:02:45,940 So copy blocked text. 35 00:02:49,010 --> 00:02:52,040 To my file, that text. 36 00:02:54,120 --> 00:02:56,520 You know, VLS, I've got two files in there. 37 00:02:56,910 --> 00:03:00,900 Really, what I wanted to do was rename and I don't want my file, that text. 38 00:03:00,900 --> 00:03:04,380 I'm going to I'm going to rename this file by moving it. 39 00:03:04,380 --> 00:03:14,070 I'm going to move the contents of my file, text to text, file that text, move command. 40 00:03:14,640 --> 00:03:18,960 Now, if I list, I have just bloo and text file, notice it and copy it. 41 00:03:18,960 --> 00:03:21,210 Just moved or renamed in this case. 42 00:03:21,960 --> 00:03:31,440 And then if I want to remove that blood text I can R.M. Block Tab and else and notice I've just got 43 00:03:31,440 --> 00:03:33,930 my one text file that text. 44 00:03:35,080 --> 00:03:41,740 Well, sometimes we want to be able to edit a text file a little more easily from the command line, 45 00:03:41,740 --> 00:03:47,860 we can use the nano text editor, so I'll say Nano. 46 00:03:49,270 --> 00:03:59,920 Text or tweet tab, and I get the nanotech senator so I can start typing here, this is some text and 47 00:03:59,920 --> 00:04:02,620 you can move around in here with your cursor keys. 48 00:04:05,000 --> 00:04:10,730 So I can move up, I can move down, I can hit enter to add more lines, this is more text. 49 00:04:14,480 --> 00:04:17,750 I can even type down here. 50 00:04:21,460 --> 00:04:27,520 And that is it does it about a page at a time when I'm finished with my nano text editor, I want to 51 00:04:27,820 --> 00:04:30,520 use a command, I mean, a control. 52 00:04:30,520 --> 00:04:37,570 Oh, and you'll see down at the bottom of the screen here, it has oh four write out an X for exit so 53 00:04:37,570 --> 00:04:39,040 I can write this out. 54 00:04:39,610 --> 00:04:44,500 When I hit control with this filename direct text file, I'm still inside the same text file. 55 00:04:44,500 --> 00:04:45,090 That's OK. 56 00:04:45,460 --> 00:04:50,740 If you wanted to write it as a different name text file too you can hit, enter and then do a control 57 00:04:50,740 --> 00:04:51,760 X to exit. 58 00:04:53,350 --> 00:04:56,020 Now, if I'm more my text file. 59 00:04:58,410 --> 00:05:04,110 I can see the entire contents of this file on the screen, this is some text, this is a more text I 60 00:05:04,110 --> 00:05:13,350 can even type down here, come back up to the top of the screen already to remove that file, less R.M. 61 00:05:13,350 --> 00:05:14,460 text file. 62 00:05:15,720 --> 00:05:21,990 Nothing in there that I'm going to R.M. Deeyah are. 63 00:05:22,320 --> 00:05:24,480 Or you can do a remove dash recursive. 64 00:05:24,810 --> 00:05:30,700 Ah but are MDI are my files and this will only work with an empty directory, but it's empty. 65 00:05:30,720 --> 00:05:32,220 So that worked by list. 66 00:05:32,220 --> 00:05:36,780 There's nothing left in desktop and there's nothing left up on my desktop. 67 00:05:37,970 --> 00:05:45,260 We've seen how to create directories, remove directories, create files, copy files, move files or 68 00:05:45,260 --> 00:05:55,580 rename them remove or delete files and even use the nano text editor and echo echo text into a text 69 00:05:55,580 --> 00:05:55,940 file. 70 00:05:56,360 --> 00:06:02,720 Use the nano text editor to edit that text file a little better and then use the more command to show 71 00:06:02,720 --> 00:06:03,890 the contents of that file. 72 00:06:04,520 --> 00:06:08,780 So we've already got some pretty good command line chops, but we're going to keep adding on to that 73 00:06:08,780 --> 00:06:09,680 in the next lesson.