January 2009
The Archives
-
01.11.09Here documentsA here document is a way to define a literal string preserving the space, new line characters, etc. It is used with the << redirection operator and it needs a delimiter token. Let's see an example: $ cat << _END >file > This is > a multiline > string > _END $ cat file This is a multiline string I used _END as delimiter, but you can use whatever you want (endOfDocument, _EOF_, etc)
-
01.09.09Authpf: authenticated routing and firewalling on OpenBSDIn our detailed description of OpenBSD's packet filter (here and there) we mentioned authpf, and spoke of it as a useful tool, but what is it use? I tend to understand it as an instrument for authenticated routing, that is, a way to provide routing (and firewalling etc...) services only to authenticated users. Think of a corporate setting with different users having access to different services according to their identities (and not according to their computer's IPs, which may well be dynamic or different). For example, user boss may access the firm's MAIN smb (ports 139, 435) server and any http ...
-
01.07.09Viewing compressed files$ zmore test.zip Allows examination of the compressed file test.zip. zmore filters for paging through text one screenful at a time, as the more command. It works on files compressed with compress, pack, gzip or zip.
-
01.05.09ThumbnailsEasy and fast way for creating thumbnails: $ for fich in *.jpg;do convert "$fich" -resize 32x32 thumb_"$fich";done
-
01.03.09Script: all your keystrokes are belong to us$ script -a filename All the input and output (on stdout) is typescript to filename, probably for later inspection or for printing (with lpr, for which the file is prepared). Might be useful for forensic purposes (to know what you broke after an incident and what you did not break).
-
01.01.09Showing this year’s calendar$ cal 2009 2009 Jan Feb Mar S M Tu W Th F S S ...