PMLOGMV(1)

πŸ’… PMLOGMV(1) β€” the PCP archive glow-up page

okay bestie, welcome to the PMLOGMV(1) page from the General Commands Manual section β€” this is where we learn how to move, copy, and list Performance Co-Pilot archive files without losing a single crumb. ✨


🌸 NAME 🌸

pmlogmv, pmlogcp, pmlogls β€” move (rename), copy or list Performance Co-Pilot archive files 🫢


⭐ SYNOPSIS ⭐

pmlogmv [-cfNV?] [-D debug] srcname dstname
pmlogcp [-cfNV?] [-D debug] srcname dstname
pmlogls [-V?] [-D debug] srcname

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so a Performance Co-Pilot (PCP) archive isn't just one lil file, it's a whole squad of files, as created by pmlogger(1). and moving a whole squad one file at a time is giving chaos energy, so pmlogmv lets you move or rename all the files of a single PCP archive as a group, in literally one operation. iconic. πŸŽ€

similarly, pmlogcp copies all the files of a single PCP archive in a single operation. no cap. πŸ’–

pmlogls is the convenience bestie of the group: it lists the names of all the files in a single PCP archive and then exits. that's it, that's the job, and she does it flawlessly. 🌈

the srcname argument identifies the target archive, and it can be either:

  • the basename that is common to all files in that archive, or
  • one of the archive's files. either one works, she's flexible πŸ’…

for pmlogmv or pmlogcp, the new archive's basename is dstname, except when dstname is an existing directory β€” in that case the files are moved or copied into dstname using the same archive basename as srcname. periodt.


πŸ›‘οΈ the integrity thing (important, bestie)

because PCP archives are important records of system activity, special care is taken to ensure the integrity of an archive's files. for recoverable problems encountered during the execution of pmlogmv or pmlogcp, all the files associated with srcname will be preserved, and no new files with the dstname prefix will be created. πŸ™ˆ

"recoverable problems" includes:

  • signals that can be caught (such as SIGHUP, SIGINT, SIGQUIT and SIGTERM)
  • permissions issues
  • new files already existing
  • file system full events
  • etc.

πŸ”— how the moving actually works

the implementation of pmlogmv tries to use hard links (and unlinking) in the file system to avoid file copying, and so it follows the semantic restrictions of link(2). for most systems that means the directories containing both the srcname and the dstname PCP archive files need to be within the same file system. when this is not possible, pmlogmv falls back to file copying. slay, adapt, overcome. πŸ’ͺ

pmlogcp always uses file copying.


✨ OPTIONS ✨

the available command line options are:

  • -c, --checksum β€” paranoid checking mode πŸ•΅οΈβ™€οΈ when file copying is needed, each file's checksum is computed for the original file and the copied file, and the checksums must match before the copy is considered acceptable. the checksum command is chosen by trying the following in turn until one is found to be executable: md5sum(1), sha256sum(1), sha1sum(1) and sum(1). if no executable checksum command is found, a warning is issued and the checksum check is skipped. πŸ’€
  • -f, --force β€” normally pmlogmv and pmlogcp take a conservative view in respect of dstname and will not proceed if dstname contains any characters that are likely to cause a problem for sh(1). this includes:
    • "glob" characters like ?, * and [
    • shell syntax meta characters like (, |, ; and &
    • shell I/O redirection characters like < and >
    • the dollar sign, a space, etc.

the -f flag forces the rename or copy to proceed, even if dstname contains any of these "unsafe" characters. πŸ”₯

  • -N, --showme β€” perform a dry-run: checking and reporting what changes would be made, without making any changes. it's giving window shopping πŸ›οΈ
  • -V, --verbose β€” enable verbose mode. she will tell you everything πŸ‘‘
  • -?, --help β€” display usage message and exit.

😭 DIAGNOSTICS 😭

all error and warning messages are intended to be easily understood, and errors produce a non-zero exit status.


🧚 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 than for 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. iykyk πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

PCPIntro(1), md5sum(1), pmlogger(1), sha1sum(1), sha256sum(1), link(2) and LOGARCHIVE(5).


Performance Co-Pilot β€’ PCP β€” that's the source and version tag, bestie, so consider this your cute lil sign-off: go forth, move those archives, copy them safely, list them proudly, and remember β€” no new files with the dstname prefix if things go sideways. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from