i have the following files under test
directory
.
./test2
./test2/test_doc1.txt
./test2/test1
./test2/test1/test_doc2.txt
when I use rm -rf test/**/test_doc2.txt
, it does not remove the files.
what is wrong?
i have the following files under test
directory
.
./test2
./test2/test_doc1.txt
./test2/test1
./test2/test1/test_doc2.txt
when I use rm -rf test/**/test_doc2.txt
, it does not remove the files.
what is wrong?
Assuming you are using Bash.
shopt -s globstar
rm -rf test/**/test_doc2.txt
Add shopt -s globstar
to your ~/.bashrc
file if you always want to enable this feature.