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
From the course: Ubuntu Linux: Essential Commands and System Administration
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
-
-
-
-
(Locked)
Using the bash shell5m 50s
-
(Locked)
System documentation10m 30s
-
(Locked)
Files on Linux9m 20s
-
(Locked)
Work with files and directories9m 16s
-
Hard links and symbolic links6m 37s
-
(Locked)
Finding files4m 19s
-
(Locked)
Edit text files with nano and vi8m 59s
-
(Locked)
Redirection and pipes6m 15s
-
(Locked)
Manipulate text with sed and awk4m 2s
-
(Locked)
Search for and compare text with grep and diff5m 32s
-
(Locked)
Compress and decompress files8m 27s
-
(Locked)
-
-
-
-
-
-
-
-
-
-