This is a quick and dirty AWK tutorial demonstrating the most common usages and features that one can use on a daily basis. Three variants: AWK standalone, integrated into ksh, and one-liner are provided.
On my system, AWK pointed to GAWK. GAWK has an expanded command set but here we will only focus on specific to AWK.
AWK is a powerful language rarely used beyond printing a few columns but often can stack up better in performance, then other scripting languages. AWK can also make for a relatively easy learn due to it's small set of functions. This is similar to C without the complexities of such things as pointers:
Read the rest of this entry »
January 28th, 2012 | Posted in NIX Posts | No Comments
Just happened to have forgotten a password for one of my user accounts on my workstation and remembered a handy little thing one can do to reset a pass.
If you have root access, one can simply regenerate the MD5 hash with:
Read the rest of this entry »
January 14th, 2012 | Posted in NIX Posts | No Comments
In this post we'll configure network booting through PXE. PXE stands for Preboot eXecution Environment and has been available for Network Devices (or NIC's) for some time. Such a network boot setup has many uses in particular in OS setup and deployment. In this post I'll introduce the steps to quickly set one up. The only thing required is some patience, persistance and a second NIC (NIC also known as Network or Network Interface Card) card on the second PXE server together with a network cable. Some of the benefits are:
- The target environment where the OS will be installed does not need any external storage devices such as USB or CD/DVD drives.
- There is no CD burning. It is all software based.
- Most motherboards and computers support PXE today.
- You are not limited to a single file size limit in place on some USB devices.
- There's no OS size restrictions. The amount of data available to the boot software is only limited by the amount of free hard disk space on the PXE server.
These are just a few advantages that PXE has and the cost of setup, as we will see, is only time and a little patience.
Read the rest of this entry »
September 26th, 2011 | Posted in NIX Posts | 3 Comments
So you've lost the password to the root account. Worst, you've had a boot password and it was the same. Here are some instructions on how to get back into your system:
Read the rest of this entry »
September 25th, 2011 | Posted in NIX Posts | No Comments
This post is designed as a blind test, meaning its sole purpose is for testing and learning LVM functionality. In this process we will work with an existing LVM that contains live data to grow, shrink and move it's contents around. Before we do anything, a disclaimer is in order:
DISCLAIMER: Aside from the disclaimer already present on the site at the bottom, I do not recommend you to follow these instructions. The exception exists where you wish to learn and test functionality on non PRODUCTION environments (ie meaning DEVELOPMENT or QUALITY ACCEPTANCE testing environments). Using these steps puts you at risk of loosing your data. BACKUP YOUR DATA BEFORE PROCEEDING. By reading the below and following any steps, you are agreeing to undertake any and all risks associated with the resulting consequences of following the steps on this site and post below.
Having said that, let's begin. First, we'll begin by getting some information and marking our LVM for change. The goal here is to eventually resize this partition that spans the entire 1.5TB to something much smaller (around 200GB) that we can copy to a smaller part of the hard drive to free space for a new installation and VG. NOTE: Only one hard drive will be used here to do this with:
Read the rest of this entry »
September 25th, 2011 | Posted in NIX Posts | No Comments
It may become necessary to recover an LVM in case either a backup /etc/lvm/backup/<VOLGROUP> is not available or becomes lost or other conditions arise causing loss of system volume data. Here are the recovery steps I took to recover previously lost data without either a backup and using only a few open source tools:
Read the rest of this entry »
September 19th, 2011 | Posted in NIX Posts | 2 Comments
In this upgrade, I planned to skip a version to see how things go jumping up two levels. Unfortunately reading this post from The Register about Linus Torvalds had me thinking back to F14 again. (This brings back fond memories of the KDE 4.0 desktop upgrade issues in F9 that didn't go so well. I have a feeling I'll be going back to KDE but we'll find out soon enough)
Read the rest of this entry »
August 30th, 2011 | Posted in NIX Posts, Network | No Comments
Is this the smallest stop sign you've seen?
Read the rest of this entry »
July 15th, 2010 | Posted in Assorted Nuts | No Comments
The VLC player is rumoured to be one of the best players to day for playing many different formats including mts and m2ts proprietary SONY formats. (Which just so happens to be the format of my Camcorder movies) This is the way my camcorder has been saving them in and to date, there are few if any players out there capable of playing such files without first converting them (A notable exception is now Windows 7 that has this capability built in natively).
Thankfully the VLC player does the job neatly playing these two type of files well on my recent Windows 7 installation. However, I wanted to play it on Linux where I work and would like to watch the occassional movie. I was glad to see that VLC has copies for Linux as well. Unfortunately, it does not run natively from the previlidged root account and requires a regular no previlidged user account. Here is how to satisfy these conditions, run VLC from an unprevilidged account while you are logged in through the root account.
Read the rest of this entry »
July 12th, 2010 | Posted in NIX Posts, Perl | 5 Comments
For this howto we will be using the TP-LINK line of USB wireless cards. More precisely the 54Mbps TL-WN321G and the 300M TL-WN821N adapters otherwise known for running the Atheros Communications, Inc. Atheros eXtended Range™ technology. This is an important note because this is how this card will appear under Linux.
I find these adapters at least much cheaper and apparently more reliable to their DLINK counterparts - they just work out of the box with Linux without any install CD's. No drivers necessary as, presumably, the controller chip is registered as Atheros AR9170, for which drivers appear readily available on Linux systems.
Read the rest of this entry »
July 3rd, 2010 | Posted in NIX Posts, Network | No Comments