title: Untar file in Python script with wildcard
body: <p>I am trying in a Python script to import a tar.gz file from HDFS and then untar it. The file comes as follow <b>20160822073413-EoRcGvXMDIB5SVenEyD4pOEADPVPhPsg.tar.gz</b>, it  has always the same structure.</p>
  
  <p>In my python script, I would like to copy it locally and the extract the file. I am using the following command to do this:</p>
  
  <pre><code>import subprocess
  import os
  import datetime
  import time
  
  today = time.strftime("%Y%m%d")
  
  #Copy tar file from HDFS to local server
  args = ["hadoop","fs","-copyToLocal", "/locationfile/" + today + "*"]
  
  p=subprocess.Popen(args)
  
  p.wait()
  
  #Untar the CSV file 
  args = ["tar","-xzvf",today + "*"]
  
  p=subprocess.Popen(args)
  
  p.wait()
  </code></pre>
  
  <p>The import works perfectly but I am not able to extract the file, I am getting the following error:</p>
  
  <pre><code>['tar', '-xzvf', '20160822*.tar']
  tar (child): 20160822*.tar: Cannot open: No such file or directory
  tar (child): Error is not recoverable: exiting now
  tar: Child returned status 2
  tar: Error is not recoverable: exiting now
  put: `reportResults.csv': No such file or directory
  </code></pre>
  
  <p>Can anyone help me?</p>
  
  <p>Thanks a lot!</p>