From the course: Practical Linux for Network Engineers: Part 1

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Owners and groups example

Owners and groups example

- [Instructor] The owner of this file is root. The group owner is root. We then see the file size and the last modification time of the file. Cat myfile shows us that there are no contents in the file. So let's change the file by adding some text and I'll save the file. So this was the modification time before. Here I'll grep from my file so we only see the details of that file. Notice the file size has changed and so has the modification time of the file. So without grep we can see those details. With execute permission we could run that file. So I'll say bash myfile and notice hello is echoed back from the file. I could also simply run the file doing that. So if we created a new file called myfile2 and added this, so cat myfile2, and then we try to run myfile2, we get permission denied. It works that way, but notice we can't simply run myfile2. Notice the difference. Myfile1 has execute permissions. Myfile2 doesn't have execute permission. So this works, but this doesn't. Now ls has…

Contents