The following command is working as expected…
find /var/lib/mysql -name "*.csv" -or -name "*.txt" -or -name "*.text" -exec rm -f {} \;
It will remove the csv or txt file found in the data directory.
Just wanted to make sure if the syntax is correct and this is the best way to achive the results.
If you’re worried about running it on a directory full of precious files, just create a test directory with test files and try the
findon your test files. If that works, run it on your real data.