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