findinfiles
Search file content using a specific text phrase or regular expression. Keep the following in mind:
- You can search using text phrases, with or without wildcards, or regular expressions. If you enter a phrase with spaces, the exact phrase is searched for, not the individual words.
- Only current file versions are searched. Historical file versions are not included in searches.
- Text file results include the lines where a match was found. A maximum of 100 matching lines are returned per text file. For large text files, only the first 100,000 lines are searched. For long lines in text files, only the first 1,000 characters of the line are parsed. Matching lines are not included in the results for binary files. If the file type for binary files is changed to Text in the file properties, incorrect search results may be returned.
sscm findinfiles [SearchText] [-bBranch] [-h] [-pRepository] [-r] [-c] [-e] [-f] [-l] [-m] [-w] [-x] [-y[Username:Password|+|=]] [-zSCMServerAddr:PortNum|zPath] [+u]
Option | Description |
---|---|
SearchText | Text to search for. Use quotes in Unix if SearchText includes wildcard or regular expression characters. |
-b | Branch that contains the files or repository to search. If not specified, default working directory branch is used. |
-c | Search cloaked repositories. By default, no cloaked repositories are searched. |
-e | Exclude the specified file extensions. Separate file extensions with a comma. If not specified, all file extensions are included. |
-f | Search only for the specified file extensions. Separate file extensions with a comma. If not specified all files are searched. |
-h | Display online help for the command. |
-l | Limit search results to the specified number. By default, the first 50 search results are displayed. If more results than the limit are found, you are prompted to view additional results. |
-m | Perform a case-sensitive search. |
-p | Full path to the repository to search. |
-r | Recursively search all files in the repository and all subrepositories. |
-w | Interpret search text as a wildcard expression. Cannot be used with -x. |
-x | Interpret search text as a regular expression. Cannot be used with -w. |
-y | Enter a Surround SCM username and password if you do not want to use the default value. To use single sign-on, enter -y+. If you use an identity provider to authenticate, the provider web page opens if you have not yet authenticated. Authenticate with the provider and then return to the CLI. |
-z | Enter the Surround SCM Server host computer address and port number if you do not want to use the default value. IPv6 addresses must be in square brackets. If you received a server settings file from your Surround SCM administrator, enter the path to the XML file instead of entering the server connection information. |
+u | Display output in Unicode (Windows only). Output cannot be sent to a file. If output is enabled for all commands, enter +u- to disable it for this command. |
grep