I'm sure this is a beginner 101 question, but I have a genome assembly (fasta file with many, many, many contigs) and what I am looking to do is blast this file against the NCBI database as to remove contigs that may be there due to some sort of contamination. What is the easiest and quickest way to do this via the command line?
This is a not so trivial question. It depends on your data. I am not sure that a blastn would give you good results. You could start from a blastn (with outfmt 6 to parse the data) and if you are able to identify the contaminant you can download this genome and map your contigs or your reads to that genomes. Then you remove the contigs that mapped or you can also realign your genome without the reads that mapped the contaminant.
Are you working on a bacterial genome ? You should try checkm to see the completness and contaminantion of your genome
If you have a closely related genome available in GenBank then you may actually want to blast against that genome to identify contigs that should be there and separate those first. Later on you could take a look at what is left over to see if anything there you should recover.