<p>I recommend using NCBI's tool for this called <code>update_blastdb.pl</code>, shipped with the blast suite (I use the conda environment from <a href="https://bioconda.github.io/recipes/blast/README.html?highlight=blast#package-package%20%27blast%27" rel="nofollow noreferrer">bioconda</a>).</p>
<p><code>cd</code> to the directory you want nt DB in and run:</p>
<pre class="lang-sh prettyprint-override"><code>update_blastdb.pl --decompress nt
</code></pre>
<p>Pros: if a download fails for whatever reason it is retried, downloads are md5sum checked and re-running in a folder with an existing DB will (as the name suggests) only update the relevant DB portions. More information <a href="https://www.ncbi.nlm.nih.gov/books/NBK569850/" rel="nofollow noreferrer">here</a>!</p>

CC BY-SA 4.0
2023-06-14T16:47:25.117Z
2023-06-14T16:47:25.117Z
bricoletc
<p><code>-O</code> is to specify the name of the output <em>file.</em> You want the <a href="https://stackoverflow.com/questions/1078524/how-to-specify-the-location-with-wget"><code>-P</code></a> option.</p>

<p>So, from your example</p>

<pre><code>wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz" -P output/
</code></pre>

CC BY-SA 3.0
2018-01-08T12:21:28.730Z
2018-01-08T12:28:50.270Z
2018-01-08T12:28:50.270Z
heathobrien
<p>I have successfully downloaded the whole nt BLAST database into the current folder using:</p>

<pre><code>wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz" 
</code></pre>

<p>However, I would like to download it in a specific folder, e.g. output/</p>

<p>I have tried:</p>

<pre><code>wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz"  -O output/
</code></pre>

<p>but it does not work. Nothing happens. My 'wget-log' is empty.</p>

<p>I could move to that folder and download it there but I would like to remain in the same working directory.</p>

<p>C.</p>

<blast><data-download>
How to download the whole BLAST nt database into a specific folder?
# How to download the whole BLAST nt database into a specific folder?

(Asked by: username_0 on 2018-01-08)

I have successfully downloaded the whole nt BLAST database into the current folder using:
wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz" 

However, I would like to download it in a specific folder, e.g. output/
I have tried:
wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz"  -O output/

but it does not work. Nothing happens. My 'wget-log' is empty.
I could move to that folder and download it there but I would like to remain in the same working directory.
C.

**Tags:** blast, data-download

---

## 2 answers

### Answer by username_2 on 2018-01-08. Score: 9 | Accepted answer

-O is to specify the name of the output file. You want the -P option.
So, from your example
wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz" -P output/


---

### Answer by username_1 on 2023-06-14. Score: 0

I recommend using NCBI's tool for this called update_blastdb.pl, shipped with the blast suite (I use the conda environment from bioconda).
cd to the directory you want nt DB in and run:
update_blastdb.pl --decompress nt

Pros: if a download fails for whatever reason it is retried, downloads are md5sum checked and re-running in a folder with an existing DB will (as the name suggests) only update the relevant DB portions. More information here!


---

