#include <filesystem>
#include <iostream>
#include <exception>
namespace fs = std::filesystem;
int main() {
    fs::path current_dir = fs::current_path();
    try {
        for (const auto& entry : fs::directory_iterator(current_dir)) {
            if (fs::is_regular_file(entry.path())) {
                fs::remove(entry.path());
                std::cout << "Файл удален: " << entry.path() << '\n';
            }
        }
    }
    catch (fs::filesystem_error& e) {
        std::cout << "Ошибка при работе с файлами. Причина: " << e.what() << '\n';
    }
    catch (std::exception& e) {
        std::cout << "Неизвестная ошибка: " << e.what() << '\n';
    }
    return 0;
}g++ -std=c++17 main.cpp -o main -lstdc++fspkg install gccls -i1 *.html | cut -f 1 -d " "| xargs -n1 find -inumls -i1 *.html | cut -f 1 -d " "| xargs -n1 find -inum -delete
если бы проблема была бы только в termux, то файлы можно было бы удалять с помощью внешнего total commander
p.s. попробуй собрать и запустить это приложение, посмотрим на подробное сообщение об ошибке, кроме - нешмогла