Category: unix_utilities
-
a macOS .pkg file – an xar archive file
Inside the .pkg, you will find a file by the name *.pkg/Payload. That’s in fact a gzipped cpio file, so this will show you its content:
-
how to test ports – Telnet, Expect, Bash, Netcat, Nmap
For “security reasons” telnet and nmap are not included in the basic set of utilities present on a production server. And why would you install software, that you usually don’t need there? But occasionally these tools are needed and should be available for installation. I certainly like telnet and nmap for the described purposes.
-
getent is a Unix command that helps a user get entries in a number of important text files called databases
The databases it searches in are: ahosts, ahostsv4, ahostsv6, aliases, ethers (Ethernet addresses), group, gshadow, hosts, netgroup, networks, passwd, protocols, rpc, services, and shadow.
-
the “less” utility and UTF-8
https://en.wikipedia.org/wiki/Less_(Unix) http://www.greenwoodsoftware.com/less/faq.html#intl https://unix.stackexchange.com/questions/263959/how-can-i-paginate-a-utf-8-file-and-see-the-right-characters https://www.man7.org/linux/man-pages/man1/less.1.html#NATIONAL_CHARACTER_SETS
-
“Miller” is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON
https://github.com/johnkerl/miller https://csvkit.readthedocs.io – Miller is quite similar to csvkit
-
csvkit: in2csv: the Excel killer
https://csvkit.readthedocs.io https://csvkit.readthedocs.io/en/latest/tutorial/1_getting_started.html#in2csv-the-excel-killer in2csv can certainly deal with .xls and .xlsx Excel files for .xlsx files it can: list the names of all sheet names parameterised to extract the specified sheet
-
Unix …: “exa” – a modern replacement for “ls”
https://the.exa.website/ https://en.wikipedia.org/wiki/Exa_(command-line_utility) pros: … (lots, that’s why I started installing and using it all around me) cons: I can easily ignore backup files ending in a ~ (AKA “tilde”), but if I do want to see them, that’s difficult – “ls –ignore-backups” ignores backup files, if run on a directory, but it shows them, when…
-
how can I read a file from last line to first line on the Unix command line?
https://stackoverflow.com/questions/48721344/how-can-i-read-a-file-from-last-line-to-first-line-in-shell https://www.man7.org/linux/man-pages/man1/tac.1.html – cat vs tac $ perl -e ‘print reverse <>’ Input_file There are also solutions in awk and sed – read the stackoverflow article for those solutions!
-
getent – “get entries from administrative database”
https://en.wikipedia.org/wiki/Getent https://manpages.debian.org/unstable/manpages/getent.1.en.html 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…
-
Unicode::Tussle – “Tom’s Unicode Scripts So Life is Easier” – also: Unicode enabled rewrites of Unix utilities
https://metacpan.org/pod/Unicode::Tussle : Tom’s Unicode Scripts So Life is Easier https://github.com/briandfoy/Unicode-Tussle https://github.com/briandfoy/Unicode-Tussle/blob/master/script/rename – I am using this one quite frequently