Site search

Recent Posts

Meta

Categories

Posts

January 2009
M T W T F S S
« Dec    
 1234
567891011
12131415161718
19202122232425
262728293031  

Archive for 'Linux'

How to set a static IP in Ubuntu from the shell

Edit

/etc/network/interfaces
and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will [...]

Remastersys Notes

My latest project is to turn my favorite Linux desktop configurations into stand alone distributions that I can run as LiveCDs or install anywhere.
Here are some links so that I don’t forget.
http://www.ubuntugeek.com/creating-custom-ubuntu-live-cd-with-remastersys.html

The all powerful find command

find <starting point> <search criteria> <action>
The starting point is the name of the directory where find should start
looking for files. The find command examines all files in this
directory (and any subdirectories) to see if they meet the specified
search criteria. If any do, find performs the specified action on each
found file. Here are some of the [...]

Another Linux Web MySQL Backup Script

I found this on on the nixcraft craft. Looks pretty good to me. Similar
in functionality to my other script posted here. I’m going to poach
some concepts from here to make a script that will auto-optimize all
tables in all databases on the mysql server.
#!/bin/sh
##################
## jcz 17-feb-2007
## copied from http://www.cyberciti.biz/tips/
## how-to-backup-mysql-databases-web-server-
## files-to-a-ftp-server-automatically.html
##############################################
## System + MySQL backup script
## [...]

gzip all directories in a directory

I don’t know why I keep having to do this, but I do. I always to create
separate archives of all the directories in a directory. So, here is
script from David (aka Matir aka EmptyCinema) from linuxquestions.org http://www.linuxquestions.org/questions/showthread.php?s=&postid=1839513#post1839513
to do just that (along with a sample sessions using it).
#!/bin/bash
for dir in */
do dir=`echo [...]

Bash shell script for creating a poor man’s CD-ROM (removable media) catalog for linux

#!/bin/sh
# jcz 2004-jan-12
# assumes iso9660 CD-ROM
mount -t iso9660 -r /dev/cdrom /mnt/cdrom
echo “Disc Mounted. Run this program, then grep keywords in the “
echo “cdcatalogs directory to find which CD-ROM some file “
echo “is on. “
# makes the directory to store the catalog files
mkdir cdcatalogs
# runs volname (part of the eject program) to extract the volume label [...]

Paths on Linux

Today I’m going to do a test install of the J2EE mapserver-like
facilities provided by geoserver version 1.3 Rc2. I recently installed
java and the JDK on this machine, so I still need to set JAVA_HOME in
the path. I do this so rarely everytime I need to do it I have to look
it up.
I use the BASH [...]

Tips for using the ls command to list files in Cygwin or Linux

Classify
ls –classify or ls -F will append characters to files to show their type:
* / directory
* * executable

Code: ls -F
directory/ me.jpeg script.sh*

ls –color=tty
Will color the ‘ls’ output. Directories are blue, [...]

Upgrade your debian sources.list

apt-spy is a program that benchmarks debian apt-get sources. Run this
script when you need to find your bets local mirror for grabbing debian
packages.

#!/bin/sh
# jcz 2005-july-13
#
# This script will add the best debian servers to your sources.list file.
# You should prune the file by hand when it’s done.
# Date and other variables pretty self explanatory, S [...]

Changing run levels at boot time

As with most stories on this site, I use my stories to store notes on
things that I keep needing to lookup and that might help others.
This one is how to change the default startup runlevel of a debian (via
knoppix distribution). In this case I want it to stop booting into
graphical mode, or boot into runlevel [...]