Linux rm Argument List Too Long

July 29, 2019

When there are too many files to be deleted

rm *.txt
sudo: unable to execute /bin/rm: Argument list too long

Solution

find . -name "*.txt" -delete
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.