Speedlinking : A few blogs I am a fan of
It is high time I give out a bit of link love for those blogs I always rush to when there’s a new post !
In no particular order !
- Lifehacker : Software reviews, tips, and every hack you need to enhance your productivity
- l’Oeil du web : (In French) Half technical, half fun blog of a friend who moved to the south of France
- Aashiyana – Santanu and Pamela : Life, travels, civilization blog of a friend couple who moved back to India
- Terminally Incoherent : Rants and comments, technical stuff, reviews
- My SysAd Blog — UNIX : Tips about OpenSolaris
- Get Rich Slowly : Financial tips for everyday life
- Wise Bread : Financial tips, getting the most of your money
- Ririan Project : Everyday life tips
- OpenBSD Journal : Official news for the OpenBSD “free as air” Unix system.
- OSNews : News about the world of operating systems
Hmm, that’s it for now ! This post to be a “thank you” for all the authors behind those blogs who write great posts and, well, ruin my productivity 😉
Linux LVM : A short intro
If you are running Linux, then you can use LVM (Logical Volume Manager) to get an extra flexibility in the way you allocate your disk space.
Physical disks are wrapped in Physical Volumes (PVs), which are grouped in Volume Groups (VGs). Logical Volumes (LVs) can then be laid over a VG.
So, if you want do manage a disk through LVM, you start by creating a PV for it ( with pvcreate ).
Debian : update a dynamic DNS
A bit of context : I have a bind 9 DNS allowing DNS updates from clients on the LAN (ok this is fairly insecure, but still my LAN is my home LAN composed of 4 machines … let’s say that’s good enough for me ! 🙂 )
The named.conf allows those updates with this config directive in the zone config block :
allow-update {mynet; };<br />
and mynet is defined an acl directive to be my LAN.
Solaris 10 : installing … and starting SSHD
First of, you’ll have to locate and install the following packages :
- SUNWsshcu
- SUNWsshdr
- SUNWsshdu
- SUNWsshr
- SUNWsshu
The two last are the SSH client parts, it doesn’t hurt to install them.
You need to have the server keys generated in /etc/ssh. Those are the 4 files :
- ssh_host_dsa
- ssh_host_dsa.pub
- ssh_host_rsa
- ssh_host_rsa.pub
Should they not to be there, you can still generate by issuing the following command : /lib/svc/method/sshd -c.
Solaris 10: easily deal with removable media
Solaris provides vold (Volume Management Daemon) which lets you deal easily with removable media such as CDs and DVDs.
This tool is provided by the SUNWvolr and SUNWvolu packages. Once you have found those packages and installed them, accessing to your removable medias becomes a bliss : All you have to do is insert your media, and go in the configured directory (ex : /cdrom).
Solaris 10 : great doc about package management
I stumbled on the Solaris 10 training & tutorials and it holds a really nice doc about package management in Sun Solaris 10, broken in 2 parts :
- Performing Solaris 10 OS Package Administration (part1)
- Performing Solaris 10 OS Package Administration (part2)
Amongst all the information, I was especially interested in those which I always forget like how to check package installation integrity (or how to know if files have been tampered with since it was installed) with pkgchk PACKAGE_NAME (eg : pkgchk SUNWcsu) or how to check integrity of a file with pkgchk -p /path/to/file (you’ll get extra information such as which package it was installed from by adding the -l flag).
Solaris 10: On which CD is that XYZ package ?
If you want to know on which CD is a package, without :
- Mounting CD
- Searching
- Unmounting
- Swear and
- Go back to 1
Then you can :
- Mount CD #1 (mount -F hsfs /dev/dsk/
/mnt or, if you have automount cd /cdrom/cdrom0 or something like that) - Go in the Solaris_10/Product directory of the CD
- Do grep -l
.virtual_packagetoc_* which will output the .virtual_packagetoc_N where N is the number of the CD holding that package.
Exemple :
Zsh is cool : stream redirections
Zsh extends the usual stream redirections with two nice features …
Process substitutions
How often have you done the following :
- Launch one or many commands and redirect their outputs into temporary files
- Launch a command which reads and processes those temporary files
- Delete the temporary files
If you occasionaly write shell scripts then it is likely that the answer is “many times”. If so, then you’ll be glad to know that Zsh can automate this for you.
Zsh is cool : brace expansion
Quoting the zshexpn man page :
An expression of the form {n1..n2}, where n1 and n2 are integers, is expanded to every number between n1 and n2, inclusive. If either number begins with a zero, all the resulting numbers will be padded with leading zeroes to that minimum width. If the numbers are in decreasing order the resulting sequence will also be in decreasing order.
Check out this :
spaghetti% for i in {8..11}; do echo $i; done<br /> 8<br /> 9<br /> 10<br /> 11<br /> spaghetti%
bc : 2 little tricks you’ve ever wanted to know
If you’re looking for a good calculator on Linux / Unix, you can use bc. bc is “an arbitrary precision calculator” supporting bignumbers and many operators … well it will mostly do whatever you want (check the fine documentation).
Anyway, about those 2 little tricks I promised :
- change the scale variable (eg : scale=10) to set “the total number of digits after the decimal point”. Defaults to 0 -> Not cool.
- use the last variable to recall the last value you computed -> Cool.
That was it ! This is what I always need and forget, so I decided to blog it once for all…