 I'm currently in my home directory. I already have this ITS352 directory. Let's go into that and make some files in there. There's nothing in there. Actually there is. There's still a test directory. Let's get rid of that. ITS352 in my case is empty. It doesn't have to be. Let's deal with files. And a very basic thing. Let's create an empty file. An empty file is, there's a placeholder for the file. There's no contents. We can use touch followed by a file name. Choose any file name. Touch creates an empty file. Empty means the file system has a record of the file, but there's no data in it. And we can check by using ls minus l. The size of the file abc.txt that I created with touch is zero bytes, right? We don't commonly do that in this lab, but sometimes it's useful to create something for testing purposes. We can create files with touch. But a better thing to do is to create a text file and use a text editor. What's your favorite text editor? Notepad, nice selection. Notepad, any others? Notepad plus plus, okay. Any others? Text edit, there's many different text editors nowadays, okay? Notepad comes standard on Windows, but very basic. Well, same on Ubuntu Linux, there are different text editors installed and we can install others. But on the command line, just to get started today, we're gonna use one called nano. Nano. You type in nano and it opens the text editor. Press enter. Nano and we can do our normal text editing. Down the bottom of the window are some menu items and the hat character or this character means the control key. So down the bottom you see if you press control G, you'll get the help. Control X will exit. Control O right out means save. Write the file to disk. Control O says what's the file name you want to write to? Let's give it a file name. You can use a different one. My file.txt, press enter. It wrote three lines. It saved three lines on disk. So my file is saved. There are other options. One that we may use briefly today, you want to copy and paste. Normally we don't have the mouse available. Or we not rely on the mouse. So let's try and do everything with a keyboard for now. Copy and paste. Well a simple or a quick way to do it that we can use control K to cut. Control U to uncut. Uncut is like paste. Control K and control K cuts. Control U uncuts. So that's a quick way and it works on lines. There are other ways to do it on selected text. Let's make a file which has lots of lines in it, right? Just want a file so that we can use it for testing. Let's exit. Doesn't matter what's in your text file. I want something with lots of lines in it so that we can use it with some other programs. Control X to exit. It prompts me to save. Because I've modified the file. Yes I want to save. Y for yes. What file name? Just press enter. I don't want to change the file name. Now I have a file of 711 bytes. Let's find a few more statistics about the file. We can count the words in my file. WC word count. It's more than just the words. It says there are 42 lines. 145 words and 711 characters. If I just want to know the number of lines, minus L is an option. Word count minus L, my file. 42 lines in my file. For today, if you can't remember the commands, then use the reference card printed in front of you. Over time, as you use them, you'll start to memorize them. But sometimes remembering the options, minus L, is there a way to show just the number of characters or the number of words? Well, sometimes it's hard to remember the all the detailed options. So we can try some help. And usually commands have their own manual. And we can access the manual using the man command. The manual page or the man page, followed by the command, is like showing the help for that command. Try it. Man WC. This is the help page for the WC command. And you can scroll up and down with your keyboard. Up and down arrows. If I want to print the bytes only, minus C, the characters, minus M, the new lines, that is the lines, minus L, the words, minus W. So I now learn a bunch of options for WC. We can scroll up and down, press Q to quit. This is a special type of text editor. To get out of it, press Q. This is the man page. Most commands have their own man page. Man, LS. All the options for the LS command. Minus A has many options. Sometimes I'll ask a quiz question. I'll say, how to do this particular thing where you've used the command, but you need to go and find the option to give the very special case. Read the man page. Q to quit.