Finding Files of a Specific Type

You may want to perform a find operation to produce a list of files only and not include directories in the operation. The following find is similar to what we performed earlier, but this time it produces a list of files only. This is achieved by specifying that we are looking for type f for files:

# find /home -type f -print /home/httpd/apache/doc/manual.ps.gz /home/httpd/cgi-bin/HelpIndex /home/httpd/cgi-bin/HelpScreen /home/httpd/html/dt/dt.html /home/httpd/html/dt/dt.html.idx /home/httpd/html/dt/dt.index /home/httpd/html/dt/expert.gif /home/httpd/html/dt/hint.gif /home/httpd/html/dt/index.gif /home/httpd/html/dt/info2.gif /home/httpd/html/dt/note.gif /home/httpd/html/dt/sysadm.gif /home/httpd/html/dt/up.gif ...

Get HP-UX 11i System Administration Handbook and Toolkit, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.