Muffinresearch Labs by Stuart Colville

Checking tarball contents before extraction | Comments (2)

Posted in Code, Linux/Unix on 10th November 2008, 6:05 pm by Stuart

When you are about to unpack a tarball you didn’t create it’s a good idea to run the -t flag instead of just assuming it’s been packed in a sensible way.

tar -tzf foo.tar.gz

This lists all of the files in the tarball so you can be sure it’s not going to extract to somewhere you didn’t expect.

If you need tar to extract to a different location then you can use the -C flag to tell tar to cd to that directory first and then unpack the contents there.

Post Tools

Comments: Add yours

1. On November 18th, 2008 at 10:31 pm Peter Bengtsson said:

Use atools. It comes with apack and aunpack. Now you no longer need to remember the different options for tar, unzip, zip, rar, bz2 etc.
Plus it ALWAYS puts things in a directory if the there are more than one file in the archive.

To unpack
$ aunpack foo.tgz
$ cd foo

To pack
$ apack files.zip /home/peterbe/files

2. On November 20th, 2008 at 4:16 pm Stuart Colville said:

@Peter: Nice tip thanks







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



OSX Mysql app: Sequel Pro|(1)

Generally these days I’m tending to access mysql from the CLI but when writing a data importer script I needed to be able to see what tables I was accessing from two different dbs. Initially I was looking for an ERD tool but I stumbled across the successor to CocoaMysql, Sequel Pro. It’s both well executed and free which makes it my kind of app!

Inline Code Finder|(0)

Robert Nyman has released a new and improved version of his inline js finder which now also locates inline styling as well as JavaScript. Inline code finder is a great way of identifying the kind of code that should always be avoided. More details can be found at Robert’s site. Plugins are available as standalone Firefox and Firebug extensions.

Photos on Flickr

© Copyright 2004-09 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.664s.