1

I want to run a command which searches for specific files, then removes them then show how many already is deleted. So far I was using:

find -type f -name "*.cache" -exec rm {} \;

but when I have over 400k files, I'd like to know how much already was deleted like:

1 - file1234.cache
2 - file121342.cache
3 - file15467.cache
4 - file1678534.cache

1 Answer 1

2

Will satisfy you

find -type f -name "*.cache" -exec rm -v {} + | nl

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.