Delete A File From The Ifs Of The Bible

Delete A File From The Ifs Of The Bible 9,5/10 4015votes

I have large tree, with many pdf files in it. I want to delete the pdf files in this tree, but only those pdf files in sub folders named rules/ There are other type of files inside rules/. The rules/ subfolders have no other subfolders. For example, I have this tree. Everything below 'source' source/ A/ rules/*.pdf, *.txt, *.c,etc. Etc/ B/ keep_this.pdf rules/*.pdf whatever/ C/ D/ rules/*.pdf something/ and so on.

As everyone is undoubtedly aware by this point, on August 21st, folks across the country will be able to see a total solar eclipse—the first one visible coast-to. Express Helpline- Get answer of your question fast from real experts. Siouxsie And The Banshees Nocturne Rarest. Malgudi Days Series Torrent Download there.

Delete A File From The Ifs Of The Bible

There are pdf files all over the place, but I only want to delete all the pdf files which are in folders called rules/ and no other place. I think I need to use cd source find / -type d -name 'rules' -print0 xargs -0 >>But I am not sure what to do after getting list of all subfolders named rules/ Any help is appreciated. On Linux mint. You can use a bash script to do it (not the best way): #!/bin/bash # Don't screw us up with spaces! IFS=$' n'; set -f DIRS=$(find. -type d -name 'rules') for i in $DIRS; do set +f rm $i/*.pdf done set +f This iterates through the directories you find in your find command and removes the pdf's under each directory.

The line IFS=$' n' is to cope with spaces in file names, and set -f is to cope with wildcard characters. Of course, this is assuming you don't have newlines in any of your filenames. If you do, the solution will become a lot more complicated.