PMLOGBASENAME(1)

NAME
pmlogbasename - basename of a PCP archive

SYNOPSIS
pmlogbasename [-D debug] name

DESCRIPTION
pmlogbasename takes name (usually the name of one of the physical files in a PCP archive) and strips it of any compression suffixes then strips it of any PCP archive component suffixes, then reports the result (the basename of a PCP archive) on standard output.

The compression suffixes known to PCP are: .xz, .lzma, .bz2, .bz, .gz, .Z and .z.

The PCP archive component suffixes are: .meta, .index and .<n> for any integer <n>.

For the most part the stripping is purely textual and is done without tests for the existence of any of the associated files, although if name does not match the pattern of a valid file name for a PCP archive then the output is name without any stripping.

The one exception is when name ends with .N where N is a sequence of 1 or more digits, in which case an ambiguity occurs. For example consider name to be 20241125.05.48, where this could mean the archive basename is really 20241125.05.48 or it could mean this refers to volume 48 of the archive basename 20241125.05. In the former case, the file name.meta (or one of the compressed versions of this) should exist and pmlogbasename probes the filesystem to determine if such a file exists.

DEBUGGING OPTIONS
The -D or --debug option enables the output of additional diagnostics on stderr to help triage problems, although the information is sometimes cryptic and primarily intended to provide guidance for developers rather end-users. debug is a comma separated list of debugging options; use pmdbg(1) with the -l option to obtain a list of the available debugging options and their meaning.

Debugging options specific to pmlogbasename are as follows:
Option | Description
appl0 | report the name of each file that exists and potentially matches name
appl1 | report the name of each file that does not exist but was probed looking for matches with name

SEE ALSO
PCPIntro(1) and LOGARCHIVE(5).