I would like the command line utilities to deliver output in YAML, JSON or XML.
Category: GNU
-
GNU find – search for files in a directory hierarchy
print each file’s last modification time (%T+) and its name (%P):
$ find . -type f -printf '%T+ %P\n'
Because the time stamp is printed first and also in a suitable way, this is what we use to sort the files within a directory by their last modification time.
-
GNU wdiff — front end to GNU diff — word differences
Compares two files on a word per word basis, finding the word deleted or added from the first file to make the second. A word is defined as anything between whitespace. It works by creating two temporary files, one word per line, and the executes ‘diff’ on these fields. It collects the ‘diff’ output and uses it to produce a nicer display of word differences between the original files.
-
GNU Screen
Its own manual:
- https://www.gnu.org/software/screen/manual/
- https://www.gnu.org/software/screen/manual/screen.html — entirely on one web page
- https://www.gnu.org/software/screen/manual/screen.html#Regions
- https://www.gnu.org/software/screen/manual/html_node/ — with one web page per node
- https://www.gnu.org/software/screen/manual/html_node/Regions.html
- https://www.gnu.org/software/screen/manual/screen.pdf
The general prefix:
C-a.Temporarily switching to the builtin command line:
C-a :.Concepts, approaches, …:
- persistent shell session
- regions — displaying more than one window at a time, splitting horizontally or vertically (i.e. screen tiling / splitting), resizing the visible regions, …
- scrolling — the usual scrolling is not available per se — #ToBeClarified — I am not 100% sure how scrolling within screen is meant to be done, but it does not feel well and reasonably usable (what a pity! K.O.!!!)
Other links:
- https://nathan.chantrell.net/linux/an-introduction-to-screen/
- http://www.guckes.net/talks/screen/belug.txt (in German)
- http://aperiodic.net/screen/
- http://aperiodic.net/screen/quick_reference
Within books:
- https://www.safaribooksonline.com/library/view/linux-server-hacks/0596100825/ch04.html#morelnxsvrhks-CHP-4-SECT-7 — Hack #34. Disconnect Your Console Without Ending Your Session
- https://www.safaribooksonline.com/library/view/bash-cookbook-2nd/9781491975329/ch17.html#recovering_disconnected_sessions_using_screen — 17.4 Recovering Disconnected Sessions Using screen
-
getent – “get entries from administrative database”
The getent command displays entries from databases supported by the Name Service Switch libraries, which are configured in /etc/nsswitch.conf. If one or more key arguments are provided, then only the entries that match the supplied keys will be displayed. Otherwise, if no key is provided, all entries will be displayed (unless the database does not support enumeration).
My DS713+ (Intel based Synology NAS) does not have in on board, its Entware repository neither, but using “locate” I spotted a binary in a docker installation. It looks, like it is compiled for Debian, but it runs anyway.
- https://cygwin.com/packages/x86_64/getent/ – getent on cygwin
getent on macOS: basically it’s not there and there is no way to get it, and it does not make sense to emulate it; use the right tools on macOS!
- http://zzamboni.org/brt/2008/01/21/how-to-emulate-unix-getent-with-macosxs-dscl/
- https://apple.stackexchange.com/questions/44567/how-can-i-install-getent-on-snow-leopard
- https://unix.stackexchange.com/questions/373309/mac-os-command-to-resolve-hostnames-like-getent-on-linux
- https://superuser.com/questions/279891/list-all-members-of-a-group-mac-os-x/395738
- https://www.cyberciti.biz/faq/check-list-users-unix/
-
the GNU packages that I need most seriously on my “finkified” Macs
- https://wiki.jochen.hayek.name/w?title=The_GNU_packages_that_I_need_most_seriously_on_my_finkified_Macs – this is where this text should actually live and get maintained
CAVEAT!!! Read carefully beforehand:
I.e. install
- Xcode Tools/Developer Tools,
- Xcode Command Line Tools,
- and X11 !
This message wants to tell you, that the Xquartz X11 distribution is not installed (it is not something, that fink can do for you):
Can’t resolve dependency “x11-dev” for package “poppler46-shlibs-0.26.2-3” (no matching packages/versions found)
$ fink install coreutils-default grep xmlstarlet pwgen saxon wget $ fink install image-exiftool-pm # extracts date+time from JPEG files $ fink install xpdf # which includes pdfinfo; extracts date+time from PDF files $ fink install ghostscript # needed by emacs doc-view (?!?)
Note 2019-10-21: I fail installing wget, because it depends on some uncompilable gpgme11. (Solved < 2020-05-27.)
-
the GNU packages that I need most seriously on my Synology NAS
CAVEAT: In 2017 I started using opkg (Entware-NG) instead of ipkg (optware). This document may not be updated entirely to reflect the new circumstances.
- https://wiki.jochen.hayek.name/w/index.php?title=Synology_DSM – better use and maintain that article instead of this one
theses are the GNU packages I seriously need on my Synology NAS (there is actually more than one …):
$ sudo opkg list_installed
bash - A bourne style shell.
coreutils - Bunch of heavyweight *nix core utilities.
diffutils - contains gnu diff, cmp, sdiff and diff3 to display differences between and among text files.
exif - A small command-line utility to show and change EXIF information in JPEG files. // entware-ng does not have it
file - Ubiquitous file identification utility.
findutils - File finding utilities.
gcc - The GNU Compiler Collection.
ghostscript - … // includes ps2pdf
gkrellmd - Gkrellm is a utility to display system stats (cpu, processes, memory,..) in a nice little window. // server component
glib - The GLib library of C routines.
grep - Global regular expression parser.
gzip - GNU Zip data compression program. // provides: zless, zgrep, …
iconv - Character set conversion utility
less - Less file browser.
make - examines files and runs commands necessary for compilation.
nail - command-line email-client supporting POP3, IMAP, SMTP, …
perl-text-csv_xs - Text comma-separated values manipulation routines.
perlbase-cpan - CPAN perl module. // will install lots of other useful CPAN modules
poppler-utils – … // includes pdftohtml; better than the xpdf package
procps - PROCPS System Utilities.
psmisc - A set of some small useful utilities that use the proc filesystem.
rcs - The Revision Control System (RCS) manages multiple revisions of files.
rsync - fast remote file copy program (like rcp).
unzip – …
vim - Yet another version of the vi editor.
wget - A network utility to retrieve files from the Web.
# I assume these ones get installed indirectly:
pkgconfig - Package configuration tool.
util-linux - A suite of essential utilities for any Linux system.
# a few more get installed "indirectly" for sure…And BTW occasionally you want to do this:
# update list of available packages:
$ sudo opkg update
# upgrade all installed packages to latest version:
$ sudo opkg upgrade“Even” on your NAS you may want to keep source controlled text notes, that’s why even good old RCS may make sense.
Maybe it’s worth installing the “Toolchain” according to this description:
- http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc#Toolchain (disappeared before 2020-08)
$ sudo ipkg list | fgrep optware-devel
optware-devel - This is a meta package that bundles all the packages required for optware native development. When fully functional, it should ……