LinuxCommandLibrary

ark

Archive and compress or extract files

TLDR

Extract a specific archive into the current directory

$ ark [[-b|--batch]] [path/to/archive]
copy

Extract an archive into a specific directory
$ ark [[-b|--batch]] [[-o|--destination]] [path/to/directory] [path/to/archive]
copy

Create an archive if it does not exist and add specific files to it
$ ark [[-t|--add-to]] [path/to/archive] [path/to/file1 path/to/file2 ...]
copy

SYNOPSIS

ark [options] [files...]
or
ark --add-files-to-archive ...
or
ark --list-files-in-archive
or
ark --extract-files-from-archive

PARAMETERS

--add ...
    Opens Ark with a new archive creation dialog, pre-populating with specified files.

--add-files-to-archive ...
    Adds specified files to an existing archive.

--autoclose
    Closes Ark automatically after the initiated operation completes.

--batch
    Executes the operation in a non-interactive batch mode.

--destination
    Specifies the target directory for extraction operations.

--extract-files-from-archive
    Extracts all files from the specified archive to the current directory or a specified destination.

--format
    Specifies the archive format (e.g., zip, tar.gz) when creating a new archive.

--list-files-in-archive
    Lists the contents of the specified archive to standard output.

--opendialog
    Opens the 'Open Archive' file dialog upon launch.

--version
    Displays the Ark version information and exits.

DESCRIPTION

ark is the official archive management utility for the KDE Plasma desktop environment. It provides a user-friendly graphical interface to handle various archive formats, including popular ones like tar, gzip, bzip2, zip, rar, and 7z. Users can create new archives, extract files from existing ones, add or delete files within archives, and view their contents.

While primarily a GUI application, ark also supports basic command-line operations for tasks such as listing or extracting files, making it versatile for both interactive desktop use and simple scripting needs. It acts as a frontend to various command-line archiving tools installed on the system, providing a consistent and integrated experience within KDE.

CAVEATS

ark is primarily a graphical user interface (GUI) application designed for interactive desktop use within the KDE Plasma environment. While it offers some command-line options for basic operations, it is not intended as a replacement for dedicated command-line archivers like tar or zip for complex scripting or automated batch processing. Its functionality heavily relies on the presence of various backend command-line tools (e.g., tar, gzip, unzip, rar, 7z) being installed on the system, as ark itself does not implement the archiving algorithms.

SUPPORTED ARCHIVE FORMATS

ark supports a wide array of archive formats by acting as a frontend to respective command-line tools. Common formats include tar, tar.gz (gzip), tar.bz2 (bzip2), tar.xz (xz), zip, 7z (7-Zip), rar (WinRAR archives), arj, lha, iso (ISO disk images), and many more, depending on the installed backend utilities.

DESKTOP INTEGRATION

As a native KDE application, ark offers seamless integration with the KDE Plasma desktop. This includes drag-and-drop functionality, context menu options for archive operations directly from file managers like Dolphin, and robust KIO integration allowing users to open and manage archives from remote locations (e.g., FTP, SSH) without explicitly downloading them.

HISTORY

ark has been a core utility of the KDE desktop environment since its early versions, providing a unified graphical interface for archive management. It has evolved alongside KDE, integrating deeply with the desktop's look and feel, and leveraging KDE's KIO (KDE Input/Output) slaves for handling remote archives and various protocols. It is now part of KDE Gear (formerly KDE Applications), a collection of applications released by the KDE community, ensuring its continued development and maintenance as an essential component of the KDE user experience.

SEE ALSO

tar(1), zip(1), unzip(1), gzip(1), bzip2(1), xz(1), 7z(1), rar(1)

Copied to clipboard