Tech Tips
RPM packages contain a number of potentially useful information fields, and you can see many of them by using the -q and -i options with a package name:
$ rpm -q -i kernel-desktop Name : kernel-desktop Relocations: (not relocatable) Version : 2.6.31.12 Vendor: openSUSE Release : 0.1.1 Build Date: Thu 28 Jan 2010 ... Install Date: Sat 20 Feb 2010 ... Build Host: build35 Group : System/Kernel Source RPM: kernel-desktop-... Size : 122840714 License: GPLv2 Signature : RSA/8, Thu 28 Jan 2010 09:16:41 AM MST, ... Packager : http://bugs.opensuse.org URL : http://www.kernel.org/ Summary : Kernel optimized for the desktop Description : This kernel is optimized for the desktop. ... Source Timestamp: 2010-01-27 08:20:11 +0100 GIT Revision: bb438b6d99aaffb7aade40764bab1810cc21b01b GIT Branch: openSUSE-11.2 Distribution: openSUSE 11.2
These fields and others can be output individually by using the --qf or --queryformat options for rpm. Not everything above is directly an option, but many are, such as NAME and VERSION, so that you can do something like:
$ rpm -q --qf "Installed kernel is v%{VERSION}\n" kernel-desktop
Installed kernel is v2.6.31.12
The format string is similar to a printf format string, except the type specifier is replaced by the tag to output inside braces. To see a table of all installed packages and their versions, you could do this:
$ rpm -q -a --qf '%-30{NAME} Version %{VERSION}\n'|head
gpg-pubkey Version a1912208
yast2-trans-stats Version 2.15.0
yast2-country-data Version 2.18.20
libpciaccess0 Version 7.4
libpth20 Version 2.0.7
libpcre0 Version 7.9.0
netcat Version 1.10
libusb-1_0-0 Version 1.0.2
libbz2-1 Version 1.0.5
libgmp3 Version 4.3.1
...
You also can change the formatting for an item by appending a qualifier. For example, in the info listing above, there's a field called Install Date. The actual rpm tag is INSTALLTIME, and if you use that directly you get a less-than-useful value:
$ rpm -q --qf "Kernel installed %{INSTALLTIME}\n" kernel-desktop
Kernel installed 1266703208
For something more useful, append :date to the tag:
$ rpm -q --qf "Kernel installed %{INSTALLTIME:date}\n" kernel-desktop
Kernel installed Sat 20 Feb 2010 03:00:08 PM MST
gcalcli is an easy-to-use command-line tool to interact with your Google Calendar. gcalcli probably is not installed by default on your system, but it may be available via your package manager. If it's not available, get the source at code.google.com/p/gcalcli.
Once installed, you can view your current calendar week by typing:
$ gcalcli --user USERNAME --pw PASSWORD calw
To view the current month of calendar, the command is very similar:
$ gcalcli --user USERNAME --pw PASSWORD calm
Adding an item to your calendar is easy as well with the quick option:
$ gcalcli --user USERNAME --pw PASSWORD quick \
'Write another Tech Tip for LJ tomorrow 5pm'
gcalcli has many other options, such as choosing your own color scheme and agenda view. See the man page for more options.
When using GNOME, if you open a text file that has the execute bit set, you get an annoying message box each time saying “Do you want to run x.txt or display its content? x.txt is an executable text file.”
To get rid of this annoying message box, in Nautilus, go to Edit→Preferences→Behaviour, and check the radio button next to view executable text files when they are opened. The next time, the file will open directly, and no such message box will irk you.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




1 hour 59 min ago
2 hours 16 min ago
4 hours 9 min ago
6 hours 3 min ago
12 hours 57 min ago
13 hours 13 min ago
15 hours 4 min ago
20 hours 56 min ago
1 day 1 hour ago
1 day 1 hour ago