From the course: Unix Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Reading files

Reading files - Unix Tutorial

From the course: Unix Essential Training

Start my 1-month free trial

Reading files

- [Instructor] In this movie we're going to learn how to read content from files. There's three main ways. A fourth if you count opening up inside the text editor, but we're not going to do that. We're interested in commands that will read files for us. The first command is called cat, and it's kind of a funny name. It's actually short for concatenate. If we give cat several arguments, it'll read the files and also concatenate them together. But if we give it only one file name, well, then it will just return the contents of that file. So, it becomes the defacto way on Unix to just look at the contents of a file. You cat, and then the file name, and you see what's inside the file, even though it's not actually doing any concatenation. That works really well with short files, but if we have really long files, we'd really like to have some way to view those in pages or sections, instead of having it just all output at…

Contents