Finding text in files



Related topic

Use the following procedure finds text in files.

To find text in files

  1. Place the cursor in the C column of the FSPACE view.
  2. Enter the F line command next to the file that you want to search.The Find Text in File or Directory dialog is displayed (see the following figure).

    ----------------------- Find Text in File or Directory ------------------------
    | COMMAND ===>                                              SCROLL ===> CSR   |
    |                                                                             |
    |   File or Directory to Search                                               |
    |   /samples/dc3.l                                                            |
    |                                                                             |
    |  Text to Search For                                                         |
    |  root                                                                       |
    |                                                                             |
    |                                                                             |
    |                                                                             |
    |                                                                             |
    |                                                                             |
    |                                                                             |
    |  Search subdirectories? N  Y/N (When searching a directory)                 |
    |  Case Sensitive?        N  Y/N - N=Ignore upper vs. lower case              |
    |  Type of search text    S  S=String, R=Reg Exp, E=Ext Reg Exp               |
    |                                                                             |
    | END to search for the text                                                  |
    | CANcel to exit without searching                                            |
    | HELP to view related help                                                   |
    |                                                                             |
    |                                                                             |
    ______________________________________________________________________________
       pe                DIR       410    1      8192         0        1 drwxr-xr-x
       profile           EXEC      389    1      9858         0        1 -rwxr-xr-x
       queuedefs         NORM      390    1       377         0        1 -rw-r--r--
       rc                EXEC      391    1      2389         0        1 -rwxr--r--
       skulker           EXEC      392    1      4456         0        1 -rwxr-xr-x
       ssh_config        NORM    10294    1      1198         0        1 -rw-r--r--
  3. In the Text to Search For field, enter the text for which you are searching.For this example, assume that you are searching for the wordroot, the search includes the subdirectories, and the search is not case sensitive.

    The subdirectories are being searched and the search is not case-sensitive. The following figure shows the search results.

    -----------------                                      SCROLL ===> CSR  
                                                                        MORE: +
     **Search results**                                                         
     /SYSTEM/etc/httpd.conf:69:#        ServerRoot directive:                   
     /SYSTEM/etc/httpd.conf:76:#        Default:  server_root                   
     /SYSTEM/etc/httpd.conf:77:#        Syntax:   ServerRoot    <path>          
     /SYSTEM/etc/httpd.conf:78:ServerRoot     server_root                       
     /SYSTEM/etc/httpd.conf:115:#        NOTE: If you are not root, you have to
     use a port above 1024;                                                     
     /SYSTEM/etc/httpd.conf:215:#        Default:                               
     /usr/lpp/internet/server_root/httpd-pid                                    
     /SYSTEM/etc/httpd.conf:218:#idFile  /usr/lpp/internet/server_root/httpd-pid
     <-- R/O filesys                                                            
     /SYSTEM/etc/httpd.conf:219:PidFile  /usr/lpp/internet/server_root/logs/http
     d-pid                                                                      
     /SYSTEM/etc/httpd.conf:255:#              CacheRoot MUST be defined (by    
     default, no CacheRoot is defined)                                          
     /SYSTEM/etc/httpd.conf:258:#        Defaults:  AccessLog                   
     /usr/lpp/internet/server_root/logs/httpd-log                               
     /SYSTEM/etc/httpd.conf:259:#                   AgentLog                    
     /usr/lpp/internet/server_root/logs/agent-log                               
     /SYSTEM/etc/httpd.conf:260:#                   RefererLog                  
     /usr/lpp/internet/server_root/logs/referer-log                             
     /SYSTEM/etc/httpd.conf:261:#                   ErrorLog



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*