Tip of the day: Quickly extract archive from command-line using Ark

Here’s a little tip you might enjoy. I’ve been using this for some time now whenever I’m too lazy to remember how to extract something.

To extract any archive, and create a subdirectory if there is none in the archive, use this:

ark -b -a [archive(s)] …

-b is short for –batch, and just signifies that this will be handled without using the GUI. Note, that the KDE notification area will still be used for progress display.
-a is short for –autosubfolder, which creates a directory as mentioned above.

Have a look at ark –help for more things that can be done with the batch interface.

About these ads

7 Responses to “Tip of the day: Quickly extract archive from command-line using Ark”

  1. Oripi Says:

    This is awesome ! I never remember which are the tar options to extract .tar.bz2 or .tar.gz.

  2. Jucato Says:

    Cool! Thanks for sharing this. Now I don’t need to write my little script to automatically identify and extract archives with the proper options. :)

  3. arwa Says:

    Nice to handle different formats with the same tool.

    But -a does not create any directory here, even if the archive content contains many files in differen folders, that are not in the same top subfolder?!

  4. Luboš Luňák Says:

    Actually the tar command to extact something is always just ‘tar xf [archive]‘, so this is not simpler, but Ark can also handle other less-common archive types.

  5. Parker Says:

    Very convenient.

  6. Rasi Says:

    Oripi Says:
    August 28, 2009 at 10:09 am | Reply

    This is awesome ! I never remember which are the tar options to extract .tar.bz2 or .tar.gz.

    its the same for tar.bz2 and tar.gz: simply remember tar xvf.
    This will autodetect the compression mode.

  7. Ryan Says:

    Does this mean that ark can replace atool?

Comments are closed.


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: