From the course: Ubuntu Linux: Essential Commands and System Administration

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Finding files

Finding files

It's pretty easy to keep track of files that you've created if they're all in your Home directory. But if we do need to find a file somewhere on the system, there's a tool we can use called find. We can look for files by many criteria, including name, size, date, and type. In order to have something to find here on our Home directory, let's create a few files. I'll use touch to create a couple of files with different names. I'll write touch apple, pineapple, lemon, and pear, and I'll use the truncate command to create files that have different sizes. I'll write truncate -s for size, 1 MB for 1 megabyte, and I'll call that one file1. I'll press up to recall my previous command and change this to 10 megabytes for file2 and 100 megabytes for file3. Let's take a look at those. And here they are. These files that I created with truncate have no information in them. They're just defined to take up a certain amount of space. And here's the other empty files that I created with a touch…

Contents