00:01
Okay, so kiran wants to save the home directory listing to the file list .txt file and count the number of lines in the file without opening the file.
00:10
Okay, so to list out the directory listing, we use the command ls, short for list, but if we just use ls alone, it lists the files inside of the folder we're currently in.
00:23
And so to ensure that we are doing it in the home folder, we're going to do ls tilde, which is a symbol that is on the top left of your keyboard to the left of one.
00:34
And this will list out the contents of the home folder.
00:38
But we don't want to just list out the contents of the home folder, we want to save it into a file called file list .txt.
00:45
So we're going to use the output redirect, which is this symbol here, which is a greater than or equal to symbol.
00:53
So we're going to, this is telling linux or unix to put the output into a file, and we're going to call that file file list .txt.
01:05
And the problem asks us not to open the file, but for the moment, let's open the file just to see what's in it.
01:11
So if we do cat file list .txt, we see that it listed out all of the files in the directory listing of the home folder...