Undo an untar in the wrong place
tar tfz filename.tar.gz | xargs rmThis command is useful to delete the effects of accidental untarring into the wrong directory.
It works by passing the list of filenames from the stdout of the tar command into xargs, which in turn runs rm with the list of files as arguments. You could, of course, use it to run any command on all the filenames in a tar ball.
- 1Linux Top 3: Fedora 24, Peppermint 7 and Solus 1.2
- 2Linux Top 3: Alpine Linux 3.4, deepin 15.2 and Linux Lite 3.0
- 3Linux 4.7 Set to Boost Live Patching, Security and Power Management
- 4Linux 4.6 Charred Weasel adds USB 3.1 Support
- 5Linux Top 3: OpenIndiana 2016.04, Ubuntu 16.04 and Debian's New Leader