PMLOGBASENAME(1)

πŸ“¦
version 7.2.2 Β· 4 versions
, in arch rolling, fedora 43, fedora 44, ubuntu stonking

πŸ’… PMLOGBASENAME πŸ’…

okay bestie, welcome to the PMLOGBASENAME(1) page, general commands manual energy, and honestly? it's a lil bop.

✨ NAME ✨

pmlogbasename β€” the basename of a PCP archive, that's the whole gig πŸŽ€

🌸 SYNOPSIS 🌸

pmlogbasename [-D debug] name

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, pmlogbasename takes name β€” which is usually the name of one of the physical files inside a PCP archive, just so you know β€” and it strips off any compression suffixes first, then it strips off any PCP archive component suffixes, and then it tells you what's left on standard output. and what's left? that's the basename of a PCP archive. periodt. πŸ’–

the compression suffixes that PCP knows about are:

  • .xz
  • .lzma
  • .bz2
  • .bz
  • .gz
  • .Z
  • .z

and the PCP archive component suffixes are:

  • .meta
  • .index
  • .<n> for any integer <n>

ngl, for the most part the stripping is purely textual β€” it does not test whether any of the associated files actually exist. so yeah. although, if name doesn't match the pattern of a valid file name for a PCP archive, then the output is just name with no stripping at all. no notes. 🫢

now here's the one exception, and it's giving plot twist: when name ends with .N where N is a sequence of 1 or more digits, you get an ambiguity. like, imagine name is 20241125.05.48. that could mean the archive basename is really 20241125.05.48, OR it could mean this is talking about volume 48 of the archive basename 20241125.05. 😭 in the first case, the file name.meta (or one of the compressed versions of it) should exist, so pmlogbasename goes and probes the filesystem to figure out if such a file is there. iconic detective behaviour, honestly. πŸ”

πŸ’… DEBUGGING OPTIONS πŸ’…

the -D or --debug option turns on extra diagnostics on stderr to help triage problems, which is cute, but the info is sometimes kinda cryptic and it's primarily meant to guide developers rather than end-users. iykyk. πŸ™ˆ debug is a comma separated list of debugging options β€” use pmdbg(1) with the -l option to get the list of available debugging options and what they mean. slay.

the debugging options that are specific to pmlogbasename are:

  • 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). go read them, bestie, they're part of the lore. πŸ“šβœ¨


and that's the whole page, fr fr πŸ’œ this came to you courtesy of Performance Co-Pilot β€” PCP, the PMLOGBASENAME(1) of it all β€” mwah, go forth and strip those suffixes, you absolute main character πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from