Chapter 2. Using find and xargs

Occasionally you will need to find files with certain characteristics (such as permissions, ownership, size, different file types etc.) on your system. There could be many reasons for this. It could be for security reasons, general admin or maybe you’ve just lost a file somewhere. Find is a very powerful tool, which can drill right down through the system or just the current directory looking for the files or directories that you want to locate.

In this chapter we will cover:

  • find options;

  • examples using the different find options; and

  • examples using xargs with find.

Because of the powerful features that come with find its options list is large, but it’s well worth going over most of them. Even if you have a NFS ...

Get Linux and Unix Shell Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.