Linux

Dunzip – Download and Unzip in Linux With One Command

Tired of downloading zip or tar files, decompressing, and then having to delete the compressed file ?

Do it all in one step with this Tip

  1. Copy and paste this function into your .bashrc (or in my case as I used .zsh, .zshrc):
     dunzip() {wget -qO- $1 | bsdtar -xvf-;}
  2. Then type the following in your terminal:
    source ~/.bashrc  

    If you are using zsh, substitute “.zshrc” for .bashrc.

Works for zip and gzipped tar files.

Example

For details on this command see this stack exchange answer to How to redirect output of wget as input to unzip? by ruario.

Regarding functions and how to use them see with arguments see Make a Bash alias that takes a parameter?.

Charlie

Recent Posts

Keyboard Browser Navigation Nirvana – Must Have Tools for Keyboard Ninjas

Keyboard Shortcuts Recently I've been coding quite a bit (working on a dart command line…

9 hours ago

Using pfSense on VirtualBox for Windows using only One Virtual Machine

pfSense on VirtualBox I've been experimenting with pfSense (firewall software you can use for DIY…

1 month ago

Firefox – Where did my pinned tabs go ?

Firefox Pinned Tabs Firefox provides the ability to "pin" a tab, so it stays in…

2 months ago

Creating a Shortcut to Windows Terminal (Or Any Other App That Doesn’t Show Shortcut Option)

Weirdly, Windows Terminal does not allow you to create a shortcut - there's no obvious…

5 months ago

Simplest Wireguard Setup Ever

Wireguard Wireguard is the newest way to setup a VPN for your home servers. What…

6 months ago

Fix Your Smart Home – Stop Tasmota Devices From Switching Randomly

While working on fixing my KuLED light switches from magically but unexpectedly switching on, I…

9 months ago