From the course: Learning Zsh
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Finding files and commands - Unix Tutorial
From the course: Learning Zsh
Finding files and commands
- [Instructor] On our system, we have some tools to help us find files. One of these is the find command, which provides a powerful search mechanism with many options. Find isn't unique to the Z shell, but it is very useful. To use find, we'll type the find command and then provide a path to look in and then we can provide some kind of condition for the search. This will find items under the root of the file system with the name pwd. Here's the pwd command in the bin directory. If you're running as a regular user, it's common to see a permission denied message for system directories. And we can ignore these by adding 2>/dev/null to the end of the command. This is a redirection, and we'll explore those later on. But for now, we can use it to clean up the output here. We can also look by size, by date, and so on. This will list the files on my home directory larger than five kilobytes. And files smaller than five…
Contents
-
-
-
-
Autocd and cd shorthand4m 15s
-
(Locked)
Directory stack and user dirs4m 17s
-
(Locked)
Finding files and commands3m 59s
-
(Locked)
Autocompletion4m 52s
-
(Locked)
Redirection and multios6m 14s
-
(Locked)
Command history4m 24s
-
(Locked)
History shell variables2m 11s
-
(Locked)
Expansions8m 20s
-
(Locked)
Renaming files with zmv7m 29s
-
(Locked)
Scripting5m 29s
-
-
-