Will the below bash
delete all the "snps.ivg" in the given directory? Thank you
find N:\all_array\Samples -maxdepth 1 -type f -name "snps.ivg" -delete
Will the below bash
delete all the "snps.ivg" in the given directory? Thank you
find N:\all_array\Samples -maxdepth 1 -type f -name "snps.ivg" -delete
Any reason why you don't want to use rm snps.ivg
?
Try it without the -delete and see if it prints the names. If it prints the right names, you're on the right track.
So to use rm snps.ivg
to delete all 1000 entries would I use
cd "directory"
while true
do rm snps.ivg
done
I am cautious before using rm
. Thank you :).
find will not delete files if you don't put -delete into it. If you run it without the -delete it will only print names.
How is it possible to have plenty of files with the same name in one directory?
Do you mean instead �All files ending with "snps.ivg"� or �All "snps.ivg" in all sub-directories�?
Thanks for clarifying, or sorry if I missed something :p.