---
title: Evaluation of command-line options and file options
description: You can specify options for a command-line tool on the command line, in a properties file, or both.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_eval_cmdline_file_options
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_eval_cmdline_file_options.html
revdate: July 5, 2024
page_aliases: ["pingdirectoryproxy_server_administration_guide:pd_proxy_eval_cmdline_file_options.adoc", "pingdatasync_server_administration_guide:pd_sync_eval_cmdline_file_options.adoc"]
section_ids:
  example: Example
---

# Evaluation of command-line options and file options

You can specify options for a command-line tool on the command line, in a properties file, or both.

Options you specify on a tool's command line take priority over options in a properties file.

Consider the following scenarios.

| Command-line options                                                                   | Server uses …​                                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No command-line options                                                                | The options in the default `<server-root>/config/tools.properties` file.                                                                                                                                                          |
| Command-line options other than the `--propertiesFilePath <my-properties-file>` option | The command-line options, which take priority if the options are also in the `<server-root>/config/tools.properties` file.The file options for options that are only in the default `<server-root>/config/tools.properties` file. |
| Only the `--propertiesFilePath <my-properties-file>` option                            | The options in `<my-properties-file>`.                                                                                                                                                                                            |
| The` --propertiesFilePath <my-properties-file>` option and other command-line options  | The command-line options, which take priority if the options are also in `<my-properties-file>`.The file options for options that are only in `<my-properties-file>`.                                                             |
| The `--noPropertiesFile` option and other command-line options                         | Only the options you specify on the command line, ignoring the default properties file.                                                                                                                                           |

## Example

Consider this example properties file that is saved as `<server-root>/bin/tools.properties`:

```
hostname=server1.example.com
port=1389
bindDN=cn=Directory\ Manager
bindPassword=secret
```

The server checks command-line options and file options to determine the options to use, as explained below.

* All options presented with the tool on the command line take precedence over any options in a properties file.

  In the following example, the command runs with the options specified on the command line (`--port` and `--baseDN`). With the `port` value both on the command line and in the properties file, the command-line value takes priority. The command uses the `bindDN` and `bindPassword` values specified in the properties file.

  ```shell
  $ bin/ldapsearch --port 2389 --baseDN ou=People,dc=example,dc=com \
    --propertiesFilePath bin/tools.properties "(objectclass=*)"
  ```

* If you specify the properties file using the `--propertiesFilePath` option and no other command-line options, the server uses only the options in the specified properties file:

  ```shell
  $ bin/ldapsearch --propertiesFilePath bin/tools.properties \
    "(objectclass=*)"
  ```

* If you do not specify any command-line options, the server attempts to locate the default properties file in the following location:

  ```
  <server-root>/config/tools.properties
  ```

  By moving your `tools.properties` file from `<server-root>/bin` to `<server-root>/config`, you do not have to specify the `--propertiesFilePath` option. That change shortens the previous command to the following command:

  ```shell
  $ bin/ldapsearch "(objectclass=*)"
  ```
