Verifying your Linux Distro is 64bit.
I ran into a situation that I had to verify that I was running a 64bit os. Below is a quick command line check. It checks based on the current kernel loaded.
mrochford@host1:~$ fgrep CONFIG_64BIT /boot/config-`uname -r`
CONFIG_64BIT=y
mrochford@host1:~$
Popularity: 6% [?]
Run a command randomly
I wanted to run a command randomly everyday. Here is a one liner cron that I created.
echo "
Popularity: 6% [?]
Naigos Plugin: Check for packages to update in Debian/Ubuntu
Over the years I have manages a lot of systems, mostly debian based. The thing I really hate about having a lot of standalone systems is updating software. I am really bad at keeping track of new updates and I really dont want to have a cron script running to send me a email every day. Below is a script I used as a plugin for nagios.
The Script: check_for_updates.pl
Popularity: 6% [?]
Changing the I/O timeout on your SCSI disk
Changing your I/O timeout for your SCSI disks are rare. When you are running VMWare that houses the guest OS on a NFS/SAN mount you need to change the timeout. If you dont you will run into a mess with your guest OS. You will try running a snapshot and browsing your file system and bam its locks up. Below is what you need to change in your udev rules to change it.
Location: /etc/udev/rules.d/50-udev-default.rules
SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/block/sda/device/timeout'"
SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 190 > /sys/block/sda/device/timeout'"
SUBSYSTEM=="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/block/sda/device/timeout'"
Popularity: 100% [?]
Making your own ringtones for your Iphone (mp3 to m4r)
I have done much searching on the internet on how to convert mp3 files to Itunes m4r files. I really dont like using Itunes if I dont have to so I thought I would write something that will use my unix box.
This perl script will convert most mp3s to m4r.
I used 4 applications that can be installed on any GNU based system.
- mp3info - An MP3 technical info viewer and ID3 1.x tag editor
- mp3splt - Mp3Splt-project is a utility to split mp3 and ogg files selecting a begin and an end time position, without decoding.
- Mplayer
- Faac - FAAC is an open source MPEG-4 and MPEG-2 AAC encoder, it is licensed under the LGPL license.
or if you are running debian/ubuntu:
Popularity: 22% [?]