User login

Shell commands for untarring (and deleting the archive) a bunch of gzip files

In the process of adding modules Agaric finds useful to Drupal development to a special git repository I did a bit of bash command line scripting that was fun for me:

After a bunch of wget's like:
wget http://ftp.drupal.org/files/projects/schema-6.x-1.3.tar.gz

I ran:

for a in `ls -1 *.tar.gz`; do tar -zxvf $a; done
for a in `ls -1 *.tar.gz`; do rm $a; done

Credit to yapp and sthneed at LinuxQuestions.org

Resolution

Searched words: 
unzip gzip delete remove

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.