TARDY(1)

πŸ“¦
version 1.28 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

okay so this is tardy, and it lives in the General Commands Manual (you know, section 1, the one you actually type into your shell) πŸ’…


✨ NAME ✨

tardy β€” a tar post-processor πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

tardy [ option...  ][ infile [ outfile ]]
tardy -Help
tardy -VERSion

🌸 DESCRIPTION 🌸

okay bestie, listen up, because tardy is that girl. She's a program that goes in and messes with the file headers inside archive files β€” like, the metadata part, not the actual contents. The archive formats she speaks are tar(1), cpio(1), and ar(1). ✨

Why would you even want this? Real talk: it's super handy when you're getting sources ready for Internet archive sites and you do not want the whole world seeing the details of your dev environment baked into your tar(1) file. Nobody needs to know your home directory is called /home/ur_mom_69. πŸ™ˆ

One of the most useful things she does is add a prefix to the names of the files inside the tar(1) file. Classic example: you've got a tar(1) file full of absolute paths, and you need to extract it with relative paths β€” so you add the prefix β€œ.” and boom, fixed. πŸ‘‘

She understands GNU tar format headers, extended names included. No cap.

Here's the input/output tea β˜•:

  • If no input file is named, or the special name β€œ-” is used, input gets read from standard input.
  • Same energy on the other side: if no output file is named, or the special name β€œ-” is used, output goes to standard output.
  • > ⚠️ But note: tardy will refuse to read from or write to a terminal, because if you're doing that, it means you made a mistake. She's protecting you. 🫢

And the compression vibes:

  • If the input is in gzip(1) format, it will automatically be gunzip(1)ed before processing. 🧚
  • Same deal on the way out: if the output file name indicates that gzip(1) should be used, that will happen automatically on output. 🌈

πŸ’… OPTIONS πŸ’…

The following options are understood:

  • -Block_Size number β€” use this to specify the block size, as a multiple of 512 bytes. The default is -bs=20, which gives you a 10kB block size.
  • -Clean_Meta β€” makes sure file names don't contain any shell meta characters. If any show up, they get replaced with a hyphen (-). > ⚠️ Warning: this can result in duplicate file names. πŸ’€
  • -Clean_Print β€” makes sure file names only contain printable ASCII characters. Any non-printable characters found get replaced with a hyphen (-). > ⚠️ Warning: duplicate file names may result. πŸ’€
  • -Clean_Space β€” makes sure file names contain no white space characters. Any that are found get replaced with a hyphen (-). > ⚠️ Warning: duplicate file names may result. πŸ’€
  • -Clean β€” the terse way to say "all three of the above options, please". πŸŽ€
  • -DownCase β€” forces file names to be all lower case. > ⚠️ Warning: duplicate file names may result. πŸ’€
  • -EXclude pattern β€” completely removes files from the archive. Every file whose filename matches the given shell filename pattern gets removed. > ⚠️ Be careful with wild cards β€” they match everything, including slash (/) characters. The exclude pattern is applied before all file-name-manipulating patterns. πŸ”₯
  • -eXtract β€” extracts the contents of an archive. ✨
  • -Group arg β€” sets both the group name and group number fields in the header of every file in the archive file. The argument can be either a string or a number. It is an error if a corresponding entry cannot be found in the /etc/group file.
  • -Group_NAme string β€” sets the group name field in the header of every file in the archive file. The string may be any arbitrary string β€” it is not restricted to a known group. πŸ¦‹
  • -Group_NAme number β€” sets the group name field in the header of every file in the archive file. The number is mapped to a group name through the /etc/group file. It is an error if a corresponding group cannot be found.
  • -Group_NUmber string β€” sets the group number field in the header of every file in the archive file. The string is mapped to a group number through the /etc/group file. It is an error if a corresponding group cannot be found.
  • -Group_NUmber number β€” sets the group number field in the header of every file in the archive file. The number may be any arbitrary number β€” it is not restricted to a known group. πŸ’œ
  • -Help β€” use this to get more information about how to use the tardy program. 🫢
  • -Input_ForMaT name β€” by default, the input file is examined to automatically detect the input archive file's format. This option lets you specify the input format to be used. The input format names are:
    • tar β€” this format understands all of the various tar(1) formats. This is the default. ⭐
    • tar‐bsd β€” this format expects BSD tar(1) archives.
    • ustar β€” this format expects ustar(1) format archives.
    • list β€” the input is a text file containing one file name per line. The named files are read as if they were the input. It's common for find(1) to be used to form the list of file names.
    • directory β€” the input is a text file containing one file name per line. The named files are read as if they were an archive input. If any directories are found, they will be descended recursively. 🌈
    • cpio β€” the file is expected to be in one of the cpio(5) formats, and will be examined to figure out which.
    • cpio‐bin β€” this format expects cpio(5) β€œold binary” format archives.
    • cpio‐crc β€” this format expects cpio(5) β€œcrc” format archives.
    • cpio‐new‐ascii β€” this format expects cpio(5) β€œnew ascii” format archives.
    • cpio‐old‐ascii β€” this format expects cpio(5) β€œold ascii” format archives.
    • ar β€” the file is expected to be in one of the ar(1) formats, and will be examined to figure out which.
    • ar‐bsd β€” this format expects ar(1) β€œBSD” format archives.
    • ar‐pdp11 β€” this format expects ar(1) archives, in the ancient pre‐V7 format. πŸ‘‘
    • ar‐v7 β€” this format expects ar(1) β€œUnix Version 7” format archives.
Any other format name will produce an error. πŸ’€
  • -List β€” gives a terse listing of the file headers on the standard error as they are written to the output.
  • -Mode_Clear bits β€” sets the mode of each file in the archive file, by clearing the specified bits in the mode. You should use an octal number with a leading zero as the argument; if you omit the leading zero it will be interpreted as decimal. ⚠️ Order matters: the -Mode_Set option is applied first, and the -Mode_Clear option is applied second; if neither is specified, the mode of each file is unaltered.
  • -Mode_Set bits β€” sets the mode of each file in the archive file, by setting the specified bits in the mode. Again: use an octal number with a leading zero as the argument; if you omit the leading zero it will be interpreted as decimal. ⚠️
  • -No_Directories β€” suppresses directories from the output. This is useful when the archive was created with directories in useless modes. πŸ™ˆ
  • -Now β€” sets the last‐time‐modified field of the headers to the current time. Every file gets the same time. ⏰
  • -Old_Type β€” by default, tardy corrects the old normal file type into the modern normal file type. This option requests that old normal file type indicators stay unaltered.
  • -Output_ForMaT name β€” by default, tardy tries to write the same format on output as it sees on input. This option lets you specify the output format to be used. The output format names are:
    • ar β€” the archive will be written using the ar(1) format, BSD variant. > Note that this format only supports simple files; it silently discards directories, and even discards directory portions of file names. πŸ’€
    • ar‐bsd β€” the archive will be written using the ar(1) format, BSD variant. Long file names are handled by a special file at the start of the archive full of file names.
    • ar‐bsd‐l2 β€” the archive will be written using the ar(1) format, BSD variant. Long file names are handled by special file name mangling in the archive, with the actual file name transparently injected into the start of the file data. ✨
    • ar‐pdp11 β€” the archive will be written using the ar(1) format, in the most ancient pre‐V7 variant. (There are also ar‐pdp11‐le and ar‐pdp11‐le names, if you need to select the byte order.) πŸ‘‘
    • ar‐port5 β€” the archive will be written using the ar(1) format, in the PORT5 variant. (There are also ar‐port5‐le and ar‐port5‐le names, if you need to select the byte order.)
    • ar‐v7 β€” the archive will be written using the ar(1) format, ancient Unix Version 7 variant. (There are also ar‐v7‐le and
    • posix β€” the format that GNU tar uses.
    • tar‐bsd β€” the format that BSD tar(1) uses.
    • cpio β€” the new cpio(5) ASCII format.
    • cpio‐bin β€” the cpio(5) "old binary" format, using host byte order.
    • cpio‐bin‐le β€” the cpio(5) "old binary" format, using littl‐-endian byte order.
    • cpio‐bin‐be β€” the cpio(5) "old binary" format, using big‐endian byte order.
    • cpio‐crc β€” the cpio(5) "crc ascii" format.
    • cpio‐old‐ascii β€” the old cpio(5) ASCII format.
    • ustar β€” this is the format that Joerg Schilling's ustar(1) uses.
    • v7 β€” the ancient UNIX V7 tar(1) format.
Any other format name will produce an error. πŸ’€
  • -Prefix string β€” adds a prefix directory name to the name of every file in the archive file. πŸŽ€
  • -PROgress β€” okay so this one gives you a little progress indicator πŸŒ€ bestie, it's cute. BUT it only works if you also passed -ifmt=list. Like, it needs that combo or it's just vibing for nothing.
  • -Remove_Prefix number β€” this one strips a bunch of leading directories off the name of every file in the archive, if they're even there. And no cap, the prefixes get removed before whatever prefix you gave to -Prefix gets prepended. Order matters, periodt. ✨
  • -Remove_Prefix string β€” same energy, but it removes a prefix directory name from every file name in the archive, if present. You can pass this more than once and it'll remove as many of those prefixes as actually show up. Again: removed before the -Prefix one gets prepended.
πŸ’€ ngl this one can get lowkey ambiguous with the option right above it β€” like if the leading prefix you wanna nuke looks like a number. If that's your situation, just slap a slash (/) on the end of the prefix so it stops looking like a number. Problem solved, slay.
  • -UpCase β€” forces file names to be ALL UPPER CASE πŸ‘‘. Warning though, and I mean it: duplicate file names may result. You have been warned, bestie. 😭
  • -User arg β€” sets both the user name and user number fields in the header of every file in the archive. The arg can be a string or a number, your call. But if a matching entry can't be found in /etc/passwd, that's an error. Sorry, them's the rules. πŸ’…
  • -User_NAme string β€” sets the user name field in the header of every file in the archive. The string can be literally anything, it is not restricted to a known user. Free spirit energy. πŸ¦‹
  • -User_NAme number β€” also sets the user name field in the header of every file, but this time the number gets mapped to a user name via /etc/passwd. And if no matching user can be found? Error. No user, no service. 😀
  • -User_NUmber string β€” sets the user number field in the header of every file. The string gets mapped to a user number through /etc/passwd, and again β€” if no corresponding user exists, it's an error. 🫠
  • -User_NUmber number β€” sets the user number field in the header of every file. And this number can be any arbitrary number, it is not restricted to a known user. Do whatever, icon. ⭐
  • -VERSion β€” prints the version of the tardy program you're currently running. That's it, that's the whole thing. 🌸

✨ a lil note about how you're allowed to type these ✨

Every single option can be abbreviated, and the abbreviation is documented as the upper case letters. All the lower case letters and underscores (_) are optional. The catch: you have to use consecutive sequences of optional letters. Don't get cute and skip around. πŸ™ˆ

Also every option is case insensitive β€” upper case, lower case, a chaotic mix of both, it truly does not matter, case is not important here. We're not judging. πŸ’–

For example: -help, -HELP and -h all mean the -Help option. But -hlp? Not understood. Because you didn't give consecutive optional characters, bestie. Read the room. πŸ’€

Options and other command line arguments may be mixed arbitrarily on the command line β€” but only after the function selectors. Keep that order, iykyk. πŸŽ€

The GNU long option names are understood. And since every option name for tardy is long anyway, that basically means it just ignores the extra leading -. The --option=value convention is understood too. Fancy. πŸ’…


πŸ’€ EXIT STATUS πŸ’€

The tardy command will exit with a status of 1 on any error. And it will only exit with a status of 0 if there are no errors. Zero chill, zero grey area β€” either it ate or it didn't. πŸ‘‘


🌈 SEE ALSO 🌈

  • ar(1) β€” Create, modify, and extract from archives
  • ar(5) β€” Format of ar(1) archive files (heads up: not all systems have this man page) πŸ™ˆ
  • cpio(1) β€” Copy files to and from archives
  • cpio(5) β€” Format of cpio(1) archive files
  • find(1) β€” Search for files in a directory hierarchy
  • tar(1) β€” Store and extract files from a tape or disk archive
  • tar(5) β€” Format of tar(1) archive files

tardy version 1.28.D001

Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013 Peter Miller

🚨 The tardy program comes with ABSOLUTELY NO WARRANTY; for details use the tardy-VERSion License command. This is free software and you are welcome to redistribute it under certain conditions; for details use the tardy-VERSion License command. Like, go read the license, bestie, it's right there. 🫢

πŸ¦‹ AUTHOR πŸ¦‹

Peter Miller

/\/\*

and that's a wrap on tardy version 1.28.D001 β€” this page is TARDY(1) from section 1 of the manual, dated whenever your system's copy says it's dated πŸ“…βœ¨ go forth and archive responsibly, bestie πŸ’–πŸŽ€

πŸ“¦ where this page comes from