Skip to content

Instantly share code, notes, and snippets.

@ilyabrin
Created February 24, 2015 09:38
Show Gist options
  • Select an option

  • Save ilyabrin/517459579f91bb1fcab8 to your computer and use it in GitHub Desktop.

Select an option

Save ilyabrin/517459579f91bb1fcab8 to your computer and use it in GitHub Desktop.
Untar archive *.tar.gz
#!/usr/bin/ruby
def extract_tar_gz (file_path)
if File.exists?(file_path)
system "tar -xvz -C . -f #{file_path}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment