title: Using wget in an Ubuntu terminal to download all "useful" files of a directory
body: <p>I am trying to download all useful files of a directory in an website (<a href="https://cgran.org/browser/projects/ucsb_jello" rel="nofollow noreferrer">https://cgran.org/browser/projects/ucsb_jello</a>). By 'useful file', I mean the files that I can see when I go to the directory (the cpp, python and other files). I don't want to download any html file. </p>
  
  <p>I followed the suggestion of <a href="https://stackoverflow.com/questions/273743/using-wget-to-recursively-fetch-a-directory-with-arbitrary-files-in-it">Using wget to recursively fetch a directory with arbitrary files in it</a> and used the following command:</p>
  
  <p>wget -r --no-parent --reject "index.html*" '--no-check-certificate' <a href="https://cgran.org/browser/projects/ucsb_jello" rel="nofollow noreferrer">https://cgran.org/browser/projects/ucsb_jello</a>'</p>
  
  <p>Unfortunately, it downloads a lot of unnecessary files, i.e., files that I don't see in the website. Besides, it misses some important cpp files that were inside the sub-folders of the directory.</p>
  
  <p>How can I download all the sub-folders and the associated files of that directory with a single wget command? Any feedback will be appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Nazmul</p>