Author Topic: Funny comic on tar commands  (Read 143 times)

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Funny comic on tar commands
« on: February 01, 2013, 08:17:45 AM »


Mouse over text: "I don't know what's worse--the fact that after 15 years of using tar I still can't keep the flags straight, or that after 15 years of technological advancement I'm still mucking with tar flags that were 15 years old when I started"

(xkcd comic #1168: https://xkcd.com/1168/)

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6386
  • I'm going South
Re: Funny comic on tar commands
« Reply #1 on: February 01, 2013, 08:22:40 AM »
That's why we need the man pages!  8) ;D
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: Funny comic on tar commands
« Reply #2 on: February 01, 2013, 04:56:40 PM »
tar -xf
tar -cJvf

The only two that I use.  8)

Galen

Online muungwana

  • Hero Member
  • *****
  • Posts: 6252
Re: Funny comic on tar commands
« Reply #3 on: February 01, 2013, 05:05:16 PM »

he should have gone there with a script  :D

Below is the content of my script that deal with extracting various packages i download online

Code: [Select]
#!/bin/bash
arg=$1
if [ "${arg: -7}" == ".tar.gz" ] ; then
        gtar -xvzf $arg 

elif [ "${arg: -8}"  == ".tar.bz2" ] ; then
        tar -xjvf $arg

elif [ "${arg: -3}"  == ".gz" ] ; then
        gunzip -c $arg > "${arg:0:(( ${#arg} - 3))}"

elif [ "${arg: -4}"  == ".rpm" ] ; then
        rpm2cpio $arg | cpio -idmv

elif [ "${arg: -4}"  == ".deb" ] ; then
        ar vx $arg
elif [ "${arg: -4}"  == ".zip" ] ; then
        unzip $arg
elif [ "${arg: -4}"  == ".tar" ] ; then
        tar -xf  $arg
elif [ "${arg: -3}" == ".xz" ] ; then
        xz -dkv $arg
elif [ "${arg: -4}" == ".bz2" ] ; then
        bzip2 -dk $arg
else
        echo "compressed file \"$arg\" has an unrecognized file format"
fi
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: Funny comic on tar commands
« Reply #4 on: February 01, 2013, 07:43:23 PM »
I always just installed that package that lets you left click and extract the files in the menu/gui. Shell is fun and when on my server I use it, but at home I don't have the time to do it in the terminal.