FG

Delete matching files in all subdirectories

Fresh3 days ago
Mar 15, 2026226763 views
Confidence Score1%
1%

Problem

How can I remove all .swp files in all of my subdirectories under Linux?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Delete matching files in all subdirectories

Low Risk

Remove all *.swp files underneath the current directory, use the command in one of the following forms: The option means find will directly delete the matching files. This is the best match to OP's actual question. Using means find will only process files. Option allows find to execute an arbitrary command per file. The first variant will run the command once per file, and the second will run as few commands as possible by replacing with as many parameters as possible. Piping the output to is u…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment