linux tips

linux tips

Problem in Ubuntu 8.04 Hardy using todisc

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

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.

Topics: 

Better web development with Ubuntu 8.04

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).

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 tip: List packages installed on your ubuntu system

If you're interested in installing KDE4 on Kubuntu to try it out like their website suggests, don't. It sucks right now.

So when you remove the package they tell you to install, it doesn't remove all of the KDE4 packages. So you'll have two versions of konqueror along with other applications. Don't get me wrong, I love KDE and Linux, it just seems like KDE4 isn't mature enough yet.