linux

Linux

Managing processes and long jobs in Linux

If you have a long job using the command line in Linux, here are some tips.

Some jobs, such as compiling a program or using vacuumdb in postgres require a long time. Normally, you cannot use the same command line when running these jobs. If you are using ssh remotely, you're stuck (unless you login again).

Now you can add a space and ampersand at the end of the command and this *should* send this to the background. But I've found this doesn't always work. But even if it does, the following does still apply.

rsync and Ubuntu

Imagine you have a very important disk you want to mirror, or have a copy of. This could be a remote disk, like on a website, or even a directory.

You could copy and paste the files, at least if they are local disks, or use FTP. Problem solved, right?

Now, imagine you have two disks, both of which have data, but you need them to match. This was the problem I ran into with over 100 GB of data. I solved this in ubuntu using rsync.

To install, use apt-get:

$ sudo apt-get install rsync

Secure ftp using Ubuntu

I recently wanted to setup an automated backup system for a company I purchase hosting through (who promptly shut off full backups), and wanted to do so using FTP to my home computer.

The first thing I did was setup vsftpd. This is an FTP daemon that provides the ftp service. After installing the daemon and creating the system account with /bin/false as a shell, I edited /etc/vsftpd.conf. I didn't run it on a non-standard port, although you can for greater security. I did NOT enable anonymous access and neither should anyone else not requiring them.

Disk usage in Linux

Here are some simple commands to use to get the disk usage in Linux.

$ df

will give you the disk usage for all mounted drives, including available and percentage of use.

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 17077684 7868596 8341580 49% /
varrun 1038144 272 1037872 1% /var/run
varlock 1038144 0 1038144 0% /var/lock
udev 1038144 84 1038060 1% /dev
devshm 1038144 0 1038144 0% /dev/shm

Switching desktops

I switched my desktop back to gnome (think Ubuntu not Kubutnu), mostly because of AWN which is a cool menu with nice applets that extend the functionality (I have a system monitor, a weather applet, desktop switcher, file stacker, etc) (many examples can be seen on YouTube. AWN is still in heavy development so a few of the applets don't work and there are some minor bugs, but very cool.

Copy DVD in Kubuntu (Ubuntu)

I have been struggling with copying a DVD in Linux. I like to copy the ones I purchase in case they get damaged.

In any case, copying a dvd in kubuntu (or ubuntu) requires the installation of libdvdcss2, which isn't easily found.

I finally found the answer here:

https://help.ubuntu.com/community/DVD::Rip

Using the following lines, the library is installed and K3b (and other applications) can read an encrypted DVD.

sudo apt-get install libdvdread3 debhelper fakeroot

Linux Tips: Rip A CD

Why is Linux so cool and fun? Because many of the things people do with their computers are very easy to do in Linux. Like ripping a CD.

Using Kubuntu 7.04, go to the KDE menu and click system settings. Click on the advanced tab. Click on audio encoding and finally the MP3 Encoder. This is where the MP3 settings are located at (quality, bit rate).

Now, put a CD into your CD-ROM drive. You should see an icon that looks like this on your desktop.

Linux Tips: FTP with gFTP

gFTP is an open source graphical FTP client. It has a nice user interface and is easy to use. I've had problems with it doing large ftp transfers, so in those cases or cases where I want to transfer server to server, I use kasablanca. The GUI is a bit clunkier and is lacking some features, but it is best for certain situations.

Linux Tips: Image Editing With The Gimp

The Gimp, or GNU Image Manipulation Program, is an excellent, free image editing software package for Linux, and Windows. As far as I can tell, it does everything the big name programs do, except allow the creation of shapes. Coming from Fireworks, it was tough to get used to. But you can create vectors and areas, and then fill them. While I am not a professional, I did create this graphic using The Gimp.

Linux Tips: Installing And Updating

One of the reasons the average person complains about Linux is the perceived or rumored difficulty in installing software, or performing updates. It is true that it is somewhat difficult if you have to compile your application or driver, as I do with vmware (the only way to run Windows) and my video card driver, but installing and updating a Kubuntu system is not difficult and automatic most of the time.

Pages

Subscribe to RSS - linux