Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-14T16:47:25.117Z
Answers.LastActivityDate: 2023-06-14T16:47:25.117Z
Answers.UserDisplayName: bricoletc
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-08T12:21:28.730Z
Answers.LastActivityDate: 2018-01-08T12:28:50.270Z
Answers.LastEditDate: 2018-01-08T12:28:50.270Z
Answers.UserDisplayName: heathobrien
Body: <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>
  
Tags: <blast><data-download>
Title: How to download the whole BLAST nt database into a specific folder?
ThreadText: # 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`](https://stackoverflow.com/questions/1078524/how-to-specify-the-location-with-wget) 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](https://bioconda.github.io/recipes/blast/README.html?highlight=blast#package-package%20%27blast%27)).
  
  `cd` to the directory you want nt DB in and run:
  
  ```sh
  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](https://www.ncbi.nlm.nih.gov/books/NBK569850/)!
  
  
  ---
  
  