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 /home/httpd/html/dt/warning.gif /home/ftp/bin/gzip /home/ftp/bin/ls /home/ftp/bin/tar /home/ftp/etc/group /home/ftp/etc/passwd /home/col/.bashrc /home/col/.cshrc /home/col/.login /home/col/.profile /home/col/lg/lg_layouts/User /home/col/lg/lg3_prefs /home/col/lg/lg3_soundPref /home/col/lg/lg3_startup 

You can search for a variety of different types such as f for a file as shown in the example, b for a block special file, l for a symbolic link, and so on.



HP-UX 11i Systems Administration Handbook and Toolkit
HP-UX 11i Systems Administration Handbook and Toolkit (2nd Edition)
ISBN: 0131018833
EAN: 2147483647
Year: 2003
Pages: 301

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net