I try to claim ownership over my bad ideas as well as my good ones. My decision to dump everything in binutils, bsd-games, coreutils and util-linux back into my list of software was … not the best one. π
It added quite a few useful titles that were not in my original list, but it also dropped me into a flood of esoteric utilities and one-shot wonders that are really only polluting my attempts to showcase newer and stronger stuff.
My next brilliant decision π is to take the opposite tack: Add the less-intriguing titles in the mix to this page, just for archive-and-or-search purposes, and retain the half-dozen that have really caught my eye.
What that means is … here’s what I have installed (in Arch) with each package, its one-line description from the man page, and any note that I can think to make about it. If you don’t see something here, that means I have either already discussed it, or it’s going to make a special appearance in the days to come. Please stay tuned. π
Let’s go alphabetically — here’s binutils.
addr2line
: convert addresses into file names and line numbers.ar
: create, modify, and extract from archivesas
: the portable GNU assembler.c++filt
: Demangle C++ and Java symbols.elfedit
: Update the ELF header of ELF files.gprof
: display call graph profile datald
: The GNU linkernm
: list symbols from object filesobjcopy
: copy and translate object filesobjdump
: display information from object files.pwd
: print name of current/working directoryranlib
: generate index to archive.readelf
: Displays information about ELF files.size
: list section sizes and total size.strings
: print the strings of printable characters in files. (The best use I can think of for this is to point it at a mystery binary file, to find out what it is. Try it with any executable you have, and you’ll see what I mean.)strip
: Discard symbols from object files.
I don’t have much to say about binutils. With the exception of strings
, I doubt I have ever used more than two or three of these.
Here’s coreutils.
base64
: base64 encode/decode data and print to standard output (This could be another type of “encryption,” since it’s essentially a base-64 alphabet converter, and requires some understanding of the output to recognize how to “decrypt” it. Security through obfuscation, I guess.)chcon
: change file security contextchgrp
: change group ownershipchmod
: change file mode bitschown
: change file owner and groupchroot
: run command or interactive shell with special root directory (Outside of installing new systems, I rarely get a chance to use this.)cksum
: checksum and count the bytes in a file (This works as a primitive checksum utility, but doesn’t really vary much from md5sum or sha*sum.)cp
: copy files and directoriesdircolors
: color setup for ls (Sounds better than it is; just dumps your screen color codes to an editable string.)dir
: list directory contentsenv
: run a program in a modified environmentexpr
: evaluate expressions (Allows for some basic mathematical functions at the terminal too.)false
: do nothing, unsuccessfully (The most successful unsuccessful program in history.)hostid
: print the numeric identifier for the current hostinstall
: copy files and set attributeslink
: call the link function to create a link to a filelogname
: print user’s login namels
: list directory contentsmkdir
: make directoriesmknod
: make block or character special filesmktemp
: create a temporary file or directorymv
: move (rename) filesnohup
: run a command immune to hangups, with output to a non-ttynproc
: print the number of processing units availablepathchk
: check whether file names are valid or portablepinky
: lightweight fingerprintenv
: print all or part of environmentprintf
: format and print datapr
: convert text files for printingptx
: produce a permuted index of file contentspwd
: print name of current/working directoryreadlink
: print resolved symbolic links or canonical file namesrealpath
: print the resolved pathrmdir
: remove empty directoriesruncon
: run command with specified security contextsleep
: delay for a specified amount of time (I don’t have much to say about a program that just sleeps.)stdbuf
: Run COMMAND, with modified buffering operations for its standard streams.sum
: checksum and count the blocks in a filetest
: check file types and compare valuestimeout
: run a command with a time limittouch
: change file timestamps (I generally use this to show myself when I last referenced a file.)true
: do nothing, successfullytsort
: perform topological sort (I’ve never worked with this type of sorting before, so the program seems terribly obtuse. Start here if you want more information.)tty
: print the file name of the terminal connected to standard inputunexpand
: convert spaces to tabs (I haven’t been able to get this one working like it seems it should.)unlink
: call the unlink function to remove the specified fileusers
: print the user names of users currently logged in to the current hostyes
: output a string repeatedly until killed
Here’s the last of it: util-linux.
addpart
: a simple wrapper around the “add partition” ioctlagetty
: alternative Linux gettyblkdiscard
: discard sectors on a deviceblkid
: locate/print block device attributesblockdev
: call block device ioctls from the command linechcpu
: configure CPUschfn
: change your finger informationchrt
: manipulate the real-time attributes of a processchsh
: change your login shellcolcrt
: filter nroff output for CRT previewingcolrm
: remove columns from a file (Don’t think of this as a “reverse column“; it’s actually slicing away specific vertical rows of characters. Big difference.)col
: filter reverse line feeds from input (I’m not sure why this is called “col;” the only time I have ever used it is to convert man pages into plain text, i.e.,man man | col -b
)ctrlaltdel
: set the function of the Ctrl-Alt-Del combinationdelpart
: simple wrapper around the “del partition” ioctleject
: eject removable mediafallocate
: preallocate or deallocate space to a filefdformat
: low-level format a floppy disk (I guess I found it.)findfs
: find a filesystem by label or UUIDfindmnt
: find a filesystemflock
: manage locks from shell scriptsfsck.cramfs
: fsck compressed ROM file systemfsck.minix
: check consistency of Minix filesystemfsck
: check and repair a Linux filesystemfsfreeze
: suspend access to a filesystem (Ext3/4, ReiserFS, JFS, XFS)fstrim
: discard unused blocks on a mounted filesystemgetopt
: parse command options (enhanced)hexdump
: display file contents in hexadecimal, decimal, octal, or ascii (I have actually used this, long ago.)hwclock
: query or set the hardware clock (RTC) (This is useful to know about when working with very old computers, if you’re having problems where heavy processor strain causes the internal clock to lag. See this as an example, or this for more information.)i386
: change reported architecture in new program environment and set personality flagsipcmk
: make various IPC resourcesipcrm
: remove certain IPC resourcesipcs
: show information on IPC facilitiesisosize
: output the length of an iso9660 filesystemlastb
: show a listing of last logged in userslast
: show a listing of last logged in usersldattach
: attach a line discipline to a serial linelinux32
: change reported architecture in new program environment and set personality flagslinux64
: change reported architecture in new program environment and set personality flagslogger
: a shell command interface to the syslog(3) system log modulelogin
: begin session on the systemlosetup
: set up and control loop deviceslsblk
: list block deviceslscpu
: display information about the CPU architecturelslocks
: list local system lockslslogins
: display information about known users in the systemmesg
: display (or do not display) messages from other users (I have worked through this, andwrite
andwall
, more than once and never seen it work. π¦ )mkfs.bfs
: make an SCO bfs filesystemmkfs.cramfs
: make compressed ROM file systemmkfs.minix
: make a Minix filesystemmkfs
: build a Linux filesystemmkswap
: set up a Linux swap areamountpoint
: see if a directory is a mountpointmount
: mount a filesystemnamei
: follow a pathname until a terminal point is foundnewgrp
: log in to a new groupnologin
: politely refuse a loginnsenter
: run program with namespaces of other processespartx
: tell the Linux kernel about the presence and numbering of on-disk partitionspivot_root
: change the root filesystemprlimit
: get and set process resource limitsraw
: bind a Linux raw character devicereadprofile
: read kernel profiling informationresizepart
: simple wrapper around the “resize partition” ioctlrunuser
: run a command with substitute user and group IDsetarch
: change reported architecture in new program environment and set personality flagssetsid
: run a program in a new sessionsfdisk
: partition table manipulator for Linux (With both fdisk and cfdisk to consider, I rarely even hear aboutsfdisk
.)sulogin
: single-user loginsu
: run a command with substitute user and group IDswaplabel
: print or change the label or UUID of a swap areaswapoff
: enable/disable devices and files for paging and swappingswapon
: enable/disable devices and files for paging and swappingswitch_root
: switch to another filesystem as the root of the mount treetailf
: follow the growth of a log file (Not to be confused with tail‘s--follow
flag. π )taskset
: retrieve or set a process’s CPU affinityumount
: unmount file systemsuname26
: change reported architecture in new program environment and set personality flagsunshare
: run program with some namespaces unshared from parentutmpdump
: dump UTMP and WTMP files in raw formatuuidd
: UUID generation daemonuuidgen
: create a new UUID valuevigr
: edit the password or group filevipw
: edit the password or group filewall
: write a message to all userswdctl
: show hardware watchdog statuswipefs
: wipe a signature from a devicewrite
: send a message to another user
A few of those look like they have similar descriptions, but that’s probably because they are preset commands linking back to setarch
. If you use something like that frequently, you might want to double-check what options are already configured.
And of course, there’s nothing there from bsd-games, because I do believe everything from bsd-games is somewhere here. π
Please feel free to chime in if you have a particular use for any of these tools and you want to share. I don’t plan on revisiting any of these titles because my own frame of reference for them is terribly narrow. That doesn’t mean they’re not useful though.
And I apologize if this seems like a massive cop-out; in some ways it is. I wanted to cruise through those four packages one more time, but a lot of what is here is just too … unique to warrant inclusion. Perhaps it is possible to be too special.
P.S.: No, I did not retype every line from those man pages. And no, I don’t have an intern. Let’s just say I have enough skill at the prompt to slice and dice a few HTML-ized lists of programs. …
Pingback: rename: The built-in filename sifting tool | Inconsolation
Thanks for this post. There are many many utilities in the base system that most of us do not even known.
“util-linux” and “coreutils” packages are under active development, so if you are not keeping a close eye on them, some useful utilities remains unknown.
Reading your list, “hostid” attracted my attention. After searching a bit in my favourite search engine, I found that it is a semi-useless utility:
hostid(1): Print the numeric identifier (in hexadecimal) for the current host. Uses gethostid(3) system call.
gethostid(3): get a unique 32-bit identifier for the current machine. The 32-bit identifier is intended to be unique among all UNIX systems in existence.
In the glibc implementation, the hostid is stored in the file /etc/hostid. (In glibc versions before 2.2, the file /var/adm/hostid was used.)
CONFORMING TO 4.2BSD; these functions were dropped in 4.4BSD.
BUGS: It is impossible to ensure that the identifier is globally unique.
I saw that, and I’d agree that it’s semi-useless. I imagine someone might find it useful, but I can’t imagine the circumstances. And so long as that bug exists, there’s no guarantee it’s really working. … π
Pingback: rename: The built-in filename sifting tool | Linux Admins
base64 is an encoding scheme, not an encryption – best not to get the two confused. It’s used to encode arbitrary binary data into a subset of ASCII characters such that it can be embedded in another data stream that cannot cope with the binary data, but can handle text. If you use email and ever send or receive an attachment or have an image embedded in the email you have used base64 encoding without even knowing it. The base64 tool just provides a means to encode and decode data in that format from the command line.
Encrypting something means using a mathematical algorithm to make the original data impossible (ignoring weak algorithms and implementations for the moment) to read without first decrypting it using a secret key known to the intended recipient(s) of the message. Base64 does not do this, so it is not an encryption, just an encoding scheme.
Some other examples of encoding schemes for various purposes: ASCII, UTF-8, Codepage-1252, JPEG, MP3, XML, JSON, uuencode, etc.
You’re right, mine was a poor choice of words. Thanks for clarifying! π
Pingback: paste: What I thought join would be | Inconsolation
Pingback: pg: A little underfeatured, a little overweight | Inconsolation
Pingback: pg: A little underfeatured, a little overweight | Linux Admins
Pingback: stat: Simple file information, and more | Inconsolation
Pingback: shed: A simple hex editor | Inconsolation
Pingback: toast: Challenging my spongy pink organic brain | Inconsolation
Pingback: Tricks of the trade | Motho ke motho ka botho