find Verified current stable Not installed? Filesystem

Find / Test All Ppd Files In Directory

Test All Ppd Files In Directory

Recursively searches for PPD files in a directory and tests them for correctness using cupstestppd.

$
Terminal
find . -name \\*.ppd \\! -execdir cupstestppd -q '{}' \\; -print

When To Use

During printer setup or troubleshooting to ensure all PPD files function correctly.

Pro Tip

Run from a user account that has permission to the printer configuration settings, or tests may fail due to permission denial.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
./printer1.ppd
./printer2.ppd
./setup.ppd
./unused.ppd

Anatomy of Output

Understanding the result

Testing PPD files in directory: . Scanning Directory

Indicates the current directory being scanned for PPD files.

PPD file: printer.ppd tested successfully: OK Test Result

Reports success or failure of individual PPD file tests.

Total PPD files tested: 10, Errors: 0 Summary Result

Gives a total count of PPD files examined and any errors found.

Troubleshooting

Common pitfalls

No PPD files found in the specified directory.

Solution: Ensure that PPD files are present in the directory before testing.

Invalid argument: cupstestppd -q: extra condition not allowed

Solution: Review and adjust syntax; remove unintended constraints.

Permission denied: unable to access printer configuration.

Solution: Run test command as a user with appropriate permissions.

Command Breakdown

What each part is doing

find
Base Command
The executable that performs this operation. Here it runs Find before the shell applies any redirect operators.
-name
Command Option
Tool-specific option used by this command invocation.
-execdir
Command Option
Tool-specific option used by this command invocation.
-q
Command Option
Tool-specific option used by this command invocation.
-print
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: find . -name \*.ppd \! -execdir cupstestppd -q '{}' \; -print

  2. Step 2

    Verify output for tested files listed by the command.

  3. Step 3

    Ensure there are no errors returned related to ppd files.

Alternative Approaches

Comparable commands in other tools

Alternative filesystem tools for the same job.