While typing my question and reading the man
page more thoroughly, it came to me that the answering flag is -g
, so to extract from an archive a single directory into the current one, use:
dar -x archive-name -g dir/to/extract
According to the man page, dar
features six different parameters for file selection, namely -I
vs -X
, -P
vs -g
and -[
vs -]
.
The interesting one to this question has the following description:
-g, --go-into <path>
Files or directory to only take in account, as opposed to -P. -g may
be present several time on command-line. Same thing here, the
difference with -I is that the mask is applied to the
path+filename and also concerns directories. By default all files
under the -R directory are considered. Else, if one or more -g option
is given, just those are selected (if they do not match any -P
option). All paths given this way must be relative to the -R
directory. This is equivalent as giving out of any option.
Warning, -g option cannot receive wildcards, these would not be interpreted.