Peios Learn
Products
PePeios pkpekit PvProvium UDUniversal Directory TrTrail Ckclackatoo PrProject WiWispist
Using Peios Security Basics Technical Documentation Source
Using Peios Security Basics Technical Documentation Source
Peios

Text and archives

Single-page view · as markdown

Text and archive tools

Peios / Using Peios / Text and archives

Experimental includes the following commands in the system root. They are not part of the initramfs tool set.

TaskCommandsPackage
Search textgrep, including grep -E, grep -F and grep -Porg.gnu.grep
Transform linessedorg.gnu.sed
Process fields and recordsawk, gawkorg.gnu.gawk
Select files and pass argumentsfind, xargsorg.gnu.findutils
Compare filesdiff, cmp, diff3, sdifforg.gnu.diffutils
Read long files interactivelylesscom.greenwoodsoftware.less
Identify file contentsfilecom.darwinsys.file
Create and extract tar archivestarorg.gnu.tar
Gzip compressiongzip, gunzip, zcatorg.gnu.gzip
XZ compressionxz, unxz, xzcatorg.tukaani.xz
Zstandard compressionzstd, unzstd, zstdcatcom.facebook.zstd
Bzip2 compressionbzip2, bunzip2, bzcatorg.sourceware.bzip2
Create ZIP archiveszipnet.sourceforge.infozip.zip
Inspect and extract ZIP archivesunzip, zipinfonet.sourceforge.infozip.unzip

Peiosutils supplies the other basic text commands, including cat, head, tail, sort, uniq, cut, paste, join, tr and wc.

Inspecting text #

grep -n 'error' output.txt
awk '{ print $1 }' records.txt
diff before.txt after.txt
less output.txt

In less, use Space to move forward, b to move back, /pattern to search, n for the next match and q to quit. The pager does not install an editor; its edit command requires a separately installed editor.

Working with archives #

GNU tar invokes the separate compressor commands included above. The matching compression libraries alone do not provide those commands.

tar -caf backup.tar.xz documents/
tar -tf backup.tar.xz
mkdir restored
tar -xf backup.tar.xz -C restored

zip -r documents.zip documents/
unzip -l documents.zip
unzip documents.zip -d restored-zip

Use .tar.gz, .tar.xz, .tar.zst or .tar.bz2 with tar -a to choose the compressor by suffix. file archive identifies a file by its contents.

These formats exchange file contents and conventional archive metadata. Do not use them as a substitute for a Peios system backup that preserves native security descriptors and registry state.

Peios Learn — documentation for the Peios project.

Built with Trail.