Suggest a feature

Welcome to TagMyCode

Please login or create account to add a snippet.
Language: Bash
Posted by: Jose Fernando Lopez Fernandez
Added: Jun 3, 2018 1:06 AM
Modified: Jun 3, 2018 1:07 AM
Views: 35
Tags: bash files linux
Uses xargs to pipe the result of the ls wildcard operator to decompress archives of the type listed in one go, then combines delete command to clean the directory.
  1. ls *.tar.gz *.bz2 *.xz | xargs -n1 tar -xf && rm -rf *.tar.gz *.bz2 *.xz