1
00:00:07,360 --> 00:00:08,390
A what is up.

2
00:00:08,430 --> 00:00:14,380
Everybody this is Jason with Def soapstar calm and in this video we are going to learn how to create

3
00:00:14,380 --> 00:00:17,920
folders and files in this lesson.

4
00:00:17,920 --> 00:00:20,460
So let's get to it.

5
00:00:20,470 --> 00:00:23,620
All right so we've already covered how to change directories.

6
00:00:23,630 --> 00:00:23,970
All right.

7
00:00:23,980 --> 00:00:28,690
So let's go ahead and make sure that we're at our home base here.

8
00:00:28,780 --> 00:00:29,310
OK.

9
00:00:29,440 --> 00:00:32,960
So I just went to the root level of my computer here.

10
00:00:33,160 --> 00:00:38,230
Now what we want to do is I'm going to go ahead and change my directory to the desktop.

11
00:00:38,380 --> 00:00:40,910
And then we're going to go ahead and create our first folder.

12
00:00:41,110 --> 00:00:43,490
So go ahead and change that directory.

13
00:00:43,750 --> 00:00:50,890
We're going to put this folder on our desktop now to create a folder what we're going to do is we're

14
00:00:50,890 --> 00:00:57,280
going to use a command called M-K derms so for make directory All right this is going to create folders

15
00:00:57,700 --> 00:01:03,490
and this is really important to know because I use this all the time when I'm creating brand new projects

16
00:01:03,490 --> 00:01:09,940
or if I'm adding a folder to my project I'll simply do this through the terminal instead of having to

17
00:01:09,940 --> 00:01:15,850
go into the finder find my project right click click click some you know dropdown menu and create folders

18
00:01:15,900 --> 00:01:17,180
in that way.

19
00:01:17,290 --> 00:01:18,960
It's a lot easier to do it like this.

20
00:01:18,970 --> 00:01:22,920
And then we can go ahead and very quickly add files to this on our desktop.

21
00:01:22,930 --> 00:01:26,170
We're going to create a folder make directory and we'll call this

22
00:01:28,720 --> 00:01:31,520
directory fun.

23
00:01:31,530 --> 00:01:32,310
All right.

24
00:01:33,100 --> 00:01:33,450
Cool.

25
00:01:33,490 --> 00:01:40,330
So now if we list out the items on my desktop you can see that we have just created a folder called

26
00:01:40,330 --> 00:01:47,410
directory fun and in the Finder if we go over to my desktop you'll see that we've just created the folder

27
00:01:47,410 --> 00:01:48,550
right here.

28
00:01:48,550 --> 00:01:52,690
Now what I'm what I'm going to do is in the Finder I want to kind of give you a visual of what's happening

29
00:01:52,690 --> 00:01:53,340
here.

30
00:01:53,380 --> 00:01:59,140
I'm going to double click on the folder in my finder you can see that this folder is MT-NW from her

31
00:01:59,140 --> 00:01:59,750
terminal.

32
00:01:59,770 --> 00:02:04,190
What we're going to do now is we're going to create some files inside of this directory.

33
00:02:04,330 --> 00:02:08,950
So make sure that we change the directory into the folder we just created.

34
00:02:09,250 --> 00:02:12,530
And I'm going to hit tab on the directory.

35
00:02:12,580 --> 00:02:16,760
How did I spell this direct or refund.

36
00:02:16,790 --> 00:02:18,770
All right cool.

37
00:02:18,790 --> 00:02:23,070
So now we've changed our directory in here if we list the sound just like it shows in our finder and

38
00:02:23,080 --> 00:02:24,400
there there's nothing here.

39
00:02:24,670 --> 00:02:29,110
So to create a file we can use a command called Touch.

40
00:02:29,290 --> 00:02:30,910
So simply write touch.

41
00:02:31,060 --> 00:02:37,180
And then here we can create our files so say we're starting a brand new project and we need to set up

42
00:02:37,570 --> 00:02:45,280
in the mail file a CSSA file maybe a javascript file so we can do that by typing in the touch command

43
00:02:45,790 --> 00:02:50,440
and then typing in the file that we want to create and be sure that you have the extension of what we're

44
00:02:50,440 --> 00:02:53,380
creating here so we're adding an HMO file here.

45
00:02:53,380 --> 00:03:00,790
Go ahead and hit enter and you can see right here in the Finder that is created the h file for us.

46
00:03:00,790 --> 00:03:03,370
Now check this out with this touch command.

47
00:03:03,490 --> 00:03:06,670
You can actually create multiple files as well.

48
00:03:06,670 --> 00:03:13,940
So let's right touch and let's say that we need a CSSA file and javascript file.

49
00:03:14,050 --> 00:03:16,330
So we'll put a style success in a manger.

50
00:03:16,420 --> 00:03:22,810
And I'm going to go ahead and click enter and you can see that it's created both files for us.

51
00:03:22,810 --> 00:03:25,860
Now let's take this up just a notch here.

52
00:03:25,960 --> 00:03:30,720
Say that we need a directory to hold all of our services.

53
00:03:30,850 --> 00:03:38,340
So to do that and let's use the make directory command and we're going to call this folder services.

54
00:03:38,870 --> 00:03:39,530
OK.

55
00:03:39,850 --> 00:03:45,430
And you can see that the folders appeared here and then we can go ahead and simply navigate into this

56
00:03:45,430 --> 00:03:46,170
folder.

57
00:03:46,360 --> 00:03:52,820
And let's go ahead and create we'll just call this Services digest.

58
00:03:52,920 --> 00:03:53,220
OK.

59
00:03:53,230 --> 00:03:56,600
And in the Finder I'm going to click on it here so we have a visual of what's happening.

60
00:03:56,770 --> 00:04:01,260
I'm going to press enter in my terminal and it's just created the file for us.

61
00:04:01,510 --> 00:04:06,400
So we have just covered how to create directories and how to create files.

62
00:04:06,520 --> 00:04:09,320
And this is going to be very very important for you to know.

63
00:04:09,340 --> 00:04:14,230
You're going to use this all the time especially when you're setting up brand new projects or you need

64
00:04:14,230 --> 00:04:19,030
to quickly add files or directories to existing projects that you're working on.

65
00:04:19,060 --> 00:04:21,660
So that is a wrap for this lesson.

66
00:04:21,680 --> 00:04:22,480
Let's move on.

