From the course: CompTIA Security+ (SY0-601) Cert Prep: 7 Endpoint Security Design and Implementation

Unlock the full course today

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

File manipulation

File manipulation

- [Instructor] Linux provides a series of file manipulation commands that allow us to work more easily with files. The first of these is the cat command that shows the contents of a file. Here I am on a Linux server and I'm going to use these file manipulation commands to take a look at the log file stored in var log messages. So I'm just going to type the cat command to display the entire file and then /var/log/messages. When I do this, the system displays the entire log file on the screen. Now we often don't want to simply dump all of the contents of a file onto the screen, it's just too much to look at. The head command allows us to look at the first few lines of a file while the tail command allows us to look at the last few lines. Let's give those commands a try with that same var log messages file. The first thing I'm going to do is type head var log messages. By default, Linux then shows me the first 10…

Contents