linux tips

Using the mail command in Linux

The mail command is a powerful command used to manage your local mail on a *nix box. I use the mail command in (k)ubuntu frequently and have root's mail forwarded to my account on my boxes.

To use mail, you'll have to install the mailx package in (k)ubuntu.

$ sudo apt-get install mailx

When you login to your linux box via the command line you might see a message such as this:

jsteelsmith@localhost-10:~$ ssh user@example.com
Linux jacob-desktop 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686

Yakuake quake style, terminator type console for kde

Yakuake is a quake style, terminator type terminal emulator, or console for KDE.

With the rising popularity of terminator for gnome, which is very cool, I love that KDE has an equivalent.

Problem in Ubuntu 8.04 Hardy using todisc

Categories:

After using tovid to create a video, I would normally use todisc to create the DVD file structure, but ever since my installation of Ubuntu 8.04 Hardy, I kept getting this error:

sox soxio: Failed reading `-': unknown file type `raw'

Sox is a utility used to process audio. The default Hardy installation of tovid doesn't install some necessary libraries and dependencies by default. Use the command:

sudo apt-get install libsox-fmt-all

Linux tip: sudo

Categories:

At work yesterday, I had to solve a problem with a strange error.

Sorry, user <user> is not allowed to execute '/usr/bin/command' as root on <box>

Reading the work order (which did not include the error message, just that the user could not access a file), I thought it had to be a permissions issue, and in a sense I was right, but not a file permissions issue as I suspected.

Better web development with Ubuntu 8.04

Categories:

Ubuntu 8.04 provides many free tools that makes a web developer's job very easy and the tools we use better and moe secure.

First, BlueFish is a very good source editor. It has all the expected features and is very fast. Quanta is a good KDE equivalent, but so far, I believe BlueFish is faster and a bit better.

Second, virtualization is highly supported. Why is this important??

I decided to start over with my home computer. I backed up my home drive, then wiped my system drive and reinstalled. Oops...I forgot to backup mysql.

Check and repair a file system using Linux

I ran into a situation recently where an external hard drive I have, a USB drive I use for backing up my data, continuously became read only after a period of time.

Any seasoned Linux user can tell you this isn't a good thing. If the kernel detects error in the file system, rather than letting you continue to write to the drive and risk further corruption, Linux will disallow writing to the drive.

Doxygen

One of the many things I love about Linux, and Ubuntu in particular is the ability to install pretty much everything you need from the package repositories, including all the development tools you could ever need.

With other operating systems, you have to purchase or download the software, then install it. Updates are made easy as the updater checks for updates for all software installed via the repositories, vs other operating systems who only update their own. Do you ever need to go outside the repositories? I rarely do (maybe once or twice out of hundreds of installs).

Linux tip: Getting disk information

A good way to get local disk information is using the fdisk command. Under Ubuntu, it goes a little something like this.

$ sudo fdisk -l

Don't forget the sudo, or you will only get the devices you plugged in (like USB hard drives).

The output of the command looks like this:

Operating on a subset of files

One of the many powerful features of the GNU/Linux command line is the pipe character. The pipe character, or | is used to pipe the output of one command to the input of another command. For example, if you wanted to view all of the lines in a log file that have the number 500 in them (as I did on today on an Windows box), you could use this:

$ grep ' 500 ' file.log | less

Linux tips: bash history

One of the most powerful features of the bash shell is the command history . Using the up and down arrows, one can recall the commands typed previously into the shell, edit them, and execute them again, even after rebooting your computer or closing the shell window.

You can also dump the entire history file by typing in the command history. Much, much more can be done using the bash history. These functions can be explored by reading the manual page.

$ man history

linux tips

User login

Validated by HTML Validator (based on Tidy)   Ubuntu Linux   Kubuntu Linux

Stop Vista adoption   Powered by Drupal

Firefox 3

Drupal association member