“Everything is a file” rocks
Classified in : Homepage, Debian, Command line, Miscellaneous
Unix rocks, or at least one of its design feature does: everything is a file.
Here is one funny use of that feature. I consider that programs that manipulate text should basically take it on their standard input, and write it to their standard output, while specifying the name of an input or output file should be an optional refinement.
Well, at least one program was designed the other way: when used to import a foreign key, ssh-keygen -i has no option to read it on its standard input. No problem, this can be worked around:
# ssh-keygen -if /dev/stdin [paste the foreign key here]
Unfortunately, that does not work with every action of ssh-keygen since not all of them were written to be able to handle streams, which cannot be rewound.
ASCII Art signatures
Classified in : Homepage, Debian, Command line, Miscellaneous, To remember, Vélo
Using a very customizable email user agent (namely, Mutt), I am able to use several signatures depending on almost whatever criterion I want. So I spent some time drawing several thematic ones in ASCII Art, sometimes taking inspiration on existing models, sometimes entirely by myself (in bold). Hoping that it may be useful, here are some of them:
Using a gamepad under GNU/Linux
Classified in : Homepage, Debian, Miscellaneous
I have just bought a gamepad, the Saitek V.3 Cyborg Rumble Pad (also marketed as PS2700), mainly to play at SuperTuxKart under Debian GNU/Linux.
It works perfectly, except for one minor feature, and it can be used for playing and as an X11 input device.
cpio > tar
Classified in : Homepage, Debian, Miscellaneous
tar and cpio
tar(5) and cpio(5) are two competing archive formats, that provide almost identical features. Both are streamed formats, originally designed to be used on tapes. Their major practical difference is the style of their standard command line utilities:
cpio(1)
takes the list of files to archive on its standard input, allowing a very high control but requiring to use another utility such asfind(1)
to archive an entire tree;tar(1)
usually takes the list of file to archive on its command line, and browses directories recursively be default.
About system host names
Classified in : Homepage, Debian, Miscellaneous, To remember
The host name
On Unix systems, the host name is kept in memory by the kernel: it is set
and get by the sethostname()
and gethostname()
functions and their command-line wrapper hostname(1)
. It can be
used by several programs, for instance by the mail server to determine what it
should use as its HELO name.
In fact, the host name has two forms: the short one and the fully qualified one. For instance, a host can have muscadet as its short name muscadet and muscadet.example.com as its fully qualified one. From these two forms, a third information can be deduced: the domain name, which is the full name without its first component.
The system host name can be set as either the short name or the fully qualified name. When the full name is used, the short one can be easily deduced, by keeping only its first component. When the short name is used, the full name must be determined by using a more complex heuristic that takes more time and can fail for several reasons.