NULIB2(1)

๐Ÿ“ฆ
version 3.1.0 ยท 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

๐Ÿ’– NULIB2 ๐Ÿ’– (that's section 1 of the manual pages, bestie)

okay so you found nulib2 and you're like "what is this" โ€” dw, I got you. this is a General Commands Manual page and I'm about to spill all the tea. โœจ


๐ŸŒธ NAME ๐ŸŒธ

nulib2 โ€” package and compress (archive) files ๐ŸŽ€


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

nulib2 -command[modifiers] archive [ filenames ]

โœจ DESCRIPTION โœจ

so nulib2 is a disk and file archiver for NuFX (ShrinkIt) files. it can add files to and extract files from .SHK, .BXY, .SEA (as created by GS/ShrinkIt), and .BSE files. plus โ€” and this is the slay part โ€” it can also extract files from .BNY and .BQY Binary II archives. ๐Ÿ‘‘

when you're extracting, testing, or listing the contents of an archive, you can literally just pass - as the archive name and it'll read the archive from stdin. (but heads up: if that archive is Binary II, you must specify the -b flag. no cap.) ๐Ÿซถ

filenames are considered case-sensitive</>, so likeโ€ฆ be normal about your capital letters. ๐Ÿ™ˆ

this man page is just a lil summary of the available options, fr fr. for the full documentation and the latest versions, go visit http://www.nulib.com/. ๐Ÿงš


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -h โ€” get verbose help output. ask and ye shall receive. โœจ
  • -a โ€” add files to an archive. if the archive doesn't exist yet, a brand new one gets created (main character energy tbh). you must give it the list of files to add.
  • -d โ€” delete files from an archive. the set of files to delete must be provided. bye bestie ๐Ÿ’€
  • -i โ€” integrity test. if you don't list any files, then every single file in the archive gets tested. vibe check for your data. ๐Ÿฉบ
  • -p โ€” pipe extraction. all extracted files get written to stdout instead of a file on disk, and the normal archive progress messages are suppressed. quiet + mysterious. ๐Ÿคซ
  • -t โ€” table of contents. gives you a simple list of the files in the archive, one per line. ๐Ÿ“
  • -v โ€” verbose table of contents. output that's similar to what ShrinkIt displays. extra, in a good way. ๐Ÿ’–
  • -x โ€” extract files from an archive. if you don't list any files, all of them get extracted. ๐ŸŽ

๐ŸŒˆ MODIFIERS ๐ŸŒˆ

  • -c โ€” comments. when extracting, comments get displayed. when adding, you'll be prompted to enter a one-line comment for every single file. (yes, every one. bring snacks.) ๐Ÿ’ฌ
  • -e โ€” preserve ProDOS file types. see the ProDOS File Type Preservation document on http://www.nulib.com/ for the deets on how this actually works. ๐Ÿ“Ž
  • -ee โ€” preserve file types, but using extended names. a file extension gets appended to extracted files. super useful on operating systems like Windows, where filename extensions are important. when adding files, nulib2 will try to guess at the correct file types by examining the filename extension. it's giving psychic ๐Ÿ”ฎ
  • -f โ€” freshen files. when adding, files in the archive that are older than the files on disk get "freshened", which means no new files are added, and files that are the same age or newer aren't touched at all. works similarly when extracting.
  • -j โ€” junk directory names. only the filename is kept; the rest of the pathname gets thrown away. empty directories aren't stored. works when adding or extracting. ๐Ÿ—‘๏ธ
  • -k โ€” store files as disk images. files that are a multiple of 512 bytes will be added as disk images rather than normal files. this does not override the -e flag.
  • -l โ€” auto-convert text files. a reasonably smart algorithm is used to identify which files are text and which aren't during extraction. it then converts whatever EOL indicator is being used by the text file into something appropriate for the current system. ๐Ÿช„
  • -ll โ€” auto-convert all files. every file being extracted is considered text, and will be converted. > don't use this unless you're sure you need it. like, actually sure. fr.
  • -r โ€” recurse into subdirectories. when adding, this causes nulib2 to descend into subdirectories and store all of the files found. when extracting, testing, or deleting, this causes the files listed to match against all records whose prefix matches โ€” so you can extract, test, or delete entire subdirectories from the archive. it's giving tree traversal ๐ŸŒณ
  • -u โ€” update files. when adding, files in the archive that are older than the files on disk get updated. files in the archive that are the same age or newer aren't touched. new files will be added. works similarly when extracting. โœจ
  • -b โ€” Binary II. forces NuLib2 to treat the archive as Binary II. useful for opening NuFX-in-BNY archives (.BXY) if you want to strip the wrapper off. you must specify this for Binary II archives on stdin.
  • -0 โ€” don't use compression. files added will be stored without any compression. (note that's dash-zero, not dash-oh. yes this has tripped people up, no you're not alone.) ๐Ÿ™ˆ
  • -z โ€” use "deflate" compression. this option is only available if libz was linked against. > archives created with this algorithm will not be usable on an Apple II. ๐Ÿ’€
  • -zz โ€” use "bzip2" compression. this option is only available if libbz2 was linked against. > archives created with this algorithm will not be usable on an Apple II. ๐Ÿ’€

๐ŸŽ€ EXAMPLES ๐ŸŽ€

a simple example:

nulib2 a foo.shk *

this creates the archive foo.shk (assuming it doesn't exist) and stores all of the files in the current directory in it, in compressed form. easy. iconic. ๐Ÿ’…

if you wanted to add all the files in the current directory, as well as all files in all subdirectories, you could use:

nulib2 ar foo.shk *

to recursively descend into the directory tree. ๐ŸŒณ

using the command:

nulib2 xe foo.shk

would extract all files from foo.shk, preserving ProDOS file types. and if you then used the command:

nulib2 aer foo.shk *

you would add the files, preserving the file types of anything that was extracted with the -e flag set. see how it all connects? obsessed. ๐Ÿ”ฅ

a handy way to look at text documents is to use:

nulib2 xeel foo.shk

to convert end-of-line terminators (e.g. CRLF to LF) as the files are being extracted. the -ee flag adds .TXT to all files with a ProDOS file type of TXT ($04). ๐Ÿ“


๐ŸŒŸ SEE ALSO ๐ŸŒŸ

compress(1), tar(1), zip(1), unzip(1)


๐Ÿ’€ BUGS ๐Ÿ’€

Nah.


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Copyright (C) 2007 by Andy McFadden. All Rights Reserved.


and that's the whole page bestie!! ๐Ÿซถ this was NULIB2(1) from 08 Feb 2003</> โ€” yes it's giving vintage, yes it still slays. go archive something. ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from