View previous topic :: View next topic |
Author |
Message |
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Sat Nov 28, 2025 12:47 am Post subject: Obscure Linux Commands: |
|
|
Post an obscure shell command... any shell, any command.
Post the command and some type of explanation about it.
Most of us get by on a few dozen commands, 100 at the most,
but the real power of the command line is it's 5,000+ commands
and all kinds of switches and options.
How many times have you heard... Quote: | I didn't know about that command. |
This could be fun and improve your command line prowess. 
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Sat Nov 28, 2025 12:55 am Post subject: |
|
|
I'll start it off with this somewhat useless command...
bdftopcf
excerpt from the man page:
NAME
bdftopcf - convert X font from Bitmap Distribution Format to Portable
Compiled Format
SYNOPSIS
bdftopcf [ -pn ] [ -un ] [ -m ] [ -l ] [ -M ] [ -L ] [ -t ] [ -i ] [ -o
outputfile ] fontfile.bdf
DESCRIPTION
Bdftopcf is a font compiler for the X server and font server. Fonts in
Portable Compiled Format can be read by any architecture, although the
file is structured to allow one particular architecture to read them
directly without reformatting. This allows fast reading on the appro-
priate machine, but the files are still portable (but read more slowly)
on other machines.
OPTIONS
-pn Sets the font glyph padding. Each glyph in the font will have
each scanline padded in to a multiple of n bytes, where n is 1,
2, 4 or 8.
-un Sets the font scanline unit. When the font bit order is dif-
ferent from the font byte order, the scanline unit n describes
what unit of data (in bytes) are to be swapped; the unit i can
be 1, 2 or 4 bytes.
-m Sets the font bit order to MSB (most significant bit) first.
Bits for each glyph will be placed in this order; i.e., the
left most bit on the screen will be in the highest valued bit
in each unit.
-l Sets the font bit order to LSB (least significant bit) first.
The left most bit on the screen will be in the lowest valued
bit in each unit.
-M Sets the font byte order to MSB first. All multi-byte data in
the file (metrics, bitmaps and everything else) will be written
most significant byte first.
-L Sets the font byte order to LSB first. All multi-byte data in
the file (metrics, bitmaps and everything else) will be written
least significant byte first.
-t When this option is specified, bdftopcf will convert fonts into
"terminal" fonts when possible. A terminal font has each glyph
image padded to the same size; the X server can usually render
these types of fonts more quickly.
-i This option inhibits the normal computation of ink metrics.
When a font has glyph images which do not fill the bitmap image
(i.e., the "on" pixels don't extend to the edges of the met-
rics) bdftopcf computes the actual ink metrics and places them
in the .pcf file; the -t option inhibits this behaviour.
-o output-file-name
By default bdftopcf writes the pcf file to standard output;
this option gives the name of a file to be used instead.
SEE ALSO
X(7)
AUTHOR
Keith Packard, MIT X Consortium
Who else has an obscure Linux command????
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
lynch Moderator

Joined: 15 Nov 2025 Posts: 2659 Location: The Diamond State
|
Posted: Sat Nov 28, 2025 11:46 am Post subject: |
|
|
Let me check my .bash_history .....
lshw
Quote: | DESCRIPTION
lshw is a small tool to extract detailed information on the hardware configuration of the machine.
It can report exact memory configuration, firmware version, mainboard configuration, CPU version
and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some
PowerPC machines (PowerMac G4 is known to work).
It currently supports DMI (x86 and IA-64 only), OpenFirmware device tree (PowerPC only), PCI/AGP,
CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), SCSI and USB. |
Code: | usage: lshw [-format] [-options ...]
lshw -version
-version print program version (B.02.12.01)
format can be
-html output hardware tree as HTML
-xml output hardware tree as XML
-short output hardware paths
-businfo output bus information
-X use graphical interface
options can be
-class CLASS only show a certain class of hardware
-C CLASS same as '-class CLASS'
-disable TEST disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST enable a test (like pci, isapnp, cpuid, etc. )
-quiet don't display status
-sanitize sanitize output (remove sensitive information like serial numbers, etc.)
|
You need to be root or sudo for lshw.
lshw -X give you a nice gui window to view info.
Not really obscure if you are a cli person but for a casual ( read=by necessity) cli-er it's outside the top 50.
_________________ Mandriva 2025 Spring -2.6.31.12-server-2mnb
PCLinuxOS 2025 -2.6.26.8.tex3
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
Posted: Sat Nov 28, 2025 3:26 pm Post subject: |
|
|
tac
Concatenate and write files in reverse, copies each FILE (`-' means standard input), or standard input if none are given, to standard output, reversing the records (lines by default) in each separately
Syntax
tac [options]... [file]...
Options
-b
--before
The separator is attached to the beginning of the record that it
precedes in the file.
-r
--regex
Treat the separator string as a regular expression. Users of `tac'
on MS-DOS/MS-Windows should note that, since `tac' reads files in
binary mode, each line of a text file might end with a CR/LF pair
instead of the Unix-style LF.
-s SEPARATOR
--separator=SEPARATOR
Use SEPARATOR as the record separator, instead of newline."Records" are separated by instances of a string (newline by default). By default, this separator string is attached to the end of the record that it follows in the file.
_________________ Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
|
|
Back to top |
|
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Sat Nov 28, 2025 11:13 pm Post subject: |
|
|
I like it
tac - reverse of cat (literally)
Here is one, you sysadmins might actually use, but I doubt it...
anvil
NAME
anvil - Postfix session count and request rate control
SYNOPSIS
anvil [generic Postfix daemon options]
DESCRIPTION
The Postfix anvil server maintains statistics about client connec-
tion counts or client request rates. This information can be used to
defend against clients that hammer a server with either too many simul-
taneous sessions, or with too many successive requests within a config-
urable time interval. This server is designed to run under control by
the Postfix master server.
In the following text, ident specifies a (service, client) combination.
The exact syntax of that information is application-dependent; the
anvil server does not care.
too many options to list, but here are the option sub-categories:
CONNECTION COUNT/RATE CONTROL
MESSAGE RATE CONTROL
RECIPIENT RATE CONTROL
TLS SESSION NEGOTIATION RATE CONTROL
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
Lord.DragonFly.of.Dawn Advanced Member

Joined: 18 Jul 2025 Posts: 607 Location: South Portland, Maine, USA, Earth, Sol System
|
Posted: Sat Nov 28, 2025 11:35 pm Post subject: |
|
|
It's not exactly obscure, but it's one that very few people have experience with in their daily lives. It is executed thousand of times an hour world wide and yet no one ever seems to give it much notice: SED.
That's right, SED.
This useful little utility is used in thousands of little scripts scattered throughout the various Linux distributions. Working every day to make our lives easier, isn't it about time we gave it some recognition?
Three cheers for SED!
HIP HIP HOORAY!
HIP HIP HOORAY!
HIP HIP - what was the word again? oh yes! - HOORAY!
_________________ ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)
PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
Lord.DragonFly.of.Dawn Advanced Member

Joined: 18 Jul 2025 Posts: 607 Location: South Portland, Maine, USA, Earth, Sol System
|
Posted: Mon Nov 30, 2025 1:46 am Post subject: |
|
|
@crouse - Most people avoid the command line like the plague and would probably use a text editor rather than something like sed or awk
granted if those people wrote shell scripts more often they would certainly use these commands a lot more.
_________________ ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)
PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
|
|
Back to top |
|
JP Linux Guru

Joined: 07 Jul 2025 Posts: 6670 Location: Central Montana
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
Posted: Mon Nov 30, 2025 5:36 am Post subject: |
|
|
pidof
pidof [options] programs
Display the process IDs of the listed program or programs. pidof is actually a symbolic link to killall5.
Options
-o pids
Omit all processes with the specified process IDs.
-s
Return a single process ID.
-x
Also return process IDs of shells running the named scripts.
_________________ Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
VHockey86 Advanced Member

Joined: 12 Dec 2025 Posts: 988 Location: Rochester
|
Posted: Mon Nov 30, 2025 6:47 am Post subject: |
|
|
The closest I get to any sed/awk stuff is for doing search and replace in VIM :/
I tend to just whip up a 30 second Python script for simple parsing needs since that's what I'm used to using.
_________________ Main Desktops : Kubuntu 10.4. ArchLinux 64-bit. Windows7 64-bit. Windows XP 32-bit.
MacBook: OS X Snow Leopard (10.6)
|
|
Back to top |
|
Lord.DragonFly.of.Dawn Advanced Member

Joined: 18 Jul 2025 Posts: 607 Location: South Portland, Maine, USA, Earth, Sol System
|
Posted: Mon Nov 30, 2025 5:47 pm Post subject: |
|
|
crouse wrote: | pinky
It's a funny command name :) But it really is a command ... try it :) |
it's just finger......
_________________ ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)
PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
|
|
Back to top |
|
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Tue Dec 01, 2025 12:00 am Post subject: |
|
|
Yes I use sed and awk on a regular basis also. (very powerful)
@crouse - yes I used awk on HP-UX then nawk on Solaris and now gawk on Linux
OK, I bet you don't use this one everyday
ppmtoyuvsplit
ppmtoyuvsplit - convert a PPM image to 3 subsampled raw YUV files
SYNOPSIS
ppmtoyuvsplit basename [ppmfile]
DESCRIPTION
This program is part of Netpbm(1)
ppmtoyuvsplit reads a PPM image as input. Produces 3 raw files base-
name.Y, basename.U and basename.V as output.
The output files are the subsampled raw YUV representation of the input
PPM image, as required by the Stanford MPEG codec. The Y output file
contains a byte for each pixel in the image, with the rows going from
top to bottom and the columns within each row going left to right. The
U and V output files are arranged similarly, except that each byte rep-
resents a square of 4 pixels of the image. The value is the arithmetic
mean of the value for each of those 4 pixels. Hence, the Y file is 4
times the size of the U file or V file.
The YUV values are scaled according to CCIR.601, as assumed by MPEG.
SEE ALSO
yuvsplittoppm(1) , ppmtoyuv(1) , ppmtoeyuv(1) , ppmtompeg(1) , ppm(5)
AUTHOR
Copyright (C) 1993 by Andre Beck. ([email protected])
Based on ppmtoyuv.c
netpbm documentation
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
|