view counter

Feed items

Backup and playback DVD from hard drive using command line

This post is about how to backup and playback DVD content on a hard drive using the command line.

  1. Check available space on hard drive. $ df -hFilesystem Size Used Avail Use% Mounted onrootfs 1.4T 41G 1.2T 4% /udev 10M 0 10M 0% /devtmpfs 1.6G 900K 1.6G 1% /run/dev/disk/by-uuid/6c30b 1.4T 41G 1.2T 4% /tmpfs 5.0M 0 5.0M 0% /run/locktmpfs 9.6G 640K 9.6G 1% /run/shm

Increase font size of virtual terminals

My earlier post shows how to change, on the fly, the font size of X terminal emulators. Besides terminal emulators, Linux provides six virtual terminals which you can bring up from X Window by pressing Control+Alt+F1 to Control+Alt+F6 keys respectively. This post explains how to adjust the font size of virtual terminals for Debian, Ubuntu, and their derivatives.

How to change font size of terminal emulators on the fly

There is no shortage of Linux X Window terminal emulators. For a power user who works long hours with the terminal, it is important to know how to zoom in, that is, make the text larger. Your strained eyes will thank you for it. The table below summarizes how to increase and decrease the font size on the fly for an non-exhaustive list of terminal emulators.

Identify Linux distribution, code name and version info

How do you identify the Linux distribution, the specific code name and version number that is running on a machine? Below are several ways.

  1. lsb_release $ lsb_release -aNo LSB modules are available.Distributor ID: DebianDescription: Debian GNU/Linux 7.4 (wheezy)Release: 7.4Codename: wheezy If lsb_release is not installed by default on your machine, install it as follows.
    • For Fedora, Centos, and Red Hat Enterprise Linux $ sudo yum install redhat-lsb-core

How to enable mod_rewrite for Apache web server

I've installed two Content Management Systemson my Debian wheezy system - WordPress and Drupal. The web server deployed is the venerable Apache. Common to the 2 deployments is the issue of how to enable the mod_rewritemodule for the Apache web server. The rewrite module maps obscure URLs - computer gibberish - to 'clean' URLs.

Part 2: Specify default applications for file types - file managers

Part 1introduced the xdg-mime command to change the default application for a file type. If you want a GUI method, or more tweaking is required after running the command, this post is for you. File managers can create file associations - the assigning of a default application to open files of a certain extension. Below is an example of changing the PDF default application using the Nautilus file manager for the GNOME desktop.

How to specify default applications for file types: Part 1 - Command line

Numerous apps vie to open your PDF files by default - evince, xpdf, Adobe Reader, Okular, etc. If you don't like the default as dictated by your desktop environment, you can change it. The general idea is that default applications for file types, or 'file association', is governed by a set of configuration files.

How to find the MIME type of a file

Some MIME types can be intuitive - application/pdf for PDF files. However, not all MIME types are that easy to get exactly right - application/ for xls or Excel files. The following are different ways, using the command line, to identify the MIME type of a file.

  • xdg-mime $ xdg-mime query filetype somefile.xlsapplication/
  • file $ file -b --mime-type somefile.xlsapplication/

wkhtmltopdf converts HTML to PDF

Most - if not all - new electronic devices don't come with printed manuals. For the Sony laptop SVF15A1 I bought, I had to go to the Sony web site to access the user guide. The user guide is composed of many individual HTML pages. This posted a problem for me because I wanted to convert some HTML pages to PDF documents for easier off-line access. Modern web browsers, such as Chrome and Firefox, have the built-in print to PDF feature.

Find out when a package was last installed or updated

If you administer a Linux computer, you may occasionally ask when a software package was last installed or updated on your system. For a Red-Hat-based operating system - Centos, Fedora, RHEL, etc - getting the answer is a simple task of querying the RPM database. The RPM database stores, among other things, the last install date of rpm packages. To query information about the curl package: $ rpm -qi curlName : curlVersion : 7.29.0Release : 7.fc19Architecture: i686Install Date: Sun 11 Aug 2013 03:55:52 PM PDT

view counter