Monday, December 1st, 2008 11:54 PM
This command will import all the MySQL sql dumps in the current folder. You can use this to restore your backuped databases.
for i in *; do mysql -uroot `basename $i .sql` < $i; done
No Comments »
Thursday, November 27th, 2008 11:24 PM
Configure the default gateway
route add -net 0/0 gw IP_Gateway
No Comments »
Monday, November 24th, 2008 11:52 PM
See what your users are doing using SSH connected to your system - this will show you what happens on the first console. If someone is typing, you’ll be able to get an output of his keystrokes. Substitute cat /dev/vcs1 with cat /dev/vcs2 or cat /dev/vcs3 and so on for other consoles.
cat /dev/vcs1
Original Article
No Comments »
Sunday, November 16th, 2008 11:59 PM
Show link status of all interfaces
ip link show
No Comments »
Saturday, November 15th, 2008 11:22 PM
An easier way to batch convert images using the ‘convert’ command…
#!/bin/sh
# An Easy command to use the convert command. Makes sure that the rename problem don't happen
if [ ! -d "Out" ]; then
mkdir Out
fi
sel="*.*"
if [ $# -eq 2 ] ; then
sel=$2
fi
for i in $sel; do
echo -n "Converting $i ... "
convert $1 $i Out/$i
echo "Done"
done
3 Comments »
Thursday, November 13th, 2008 10:37 PM
Rip audio tracks from a CD to wav files
cd-paranoia -B
No Comments »
Tuesday, November 11th, 2008 11:40 PM
Burn a compressed ISO image
gzip -dc cd_iso.gz | cdrecord dev=/dev/cdrom
No Comments »
Monday, November 10th, 2008 12:01 AM
Show all deb packages with the name “httpd”
dpkg -l | grep httpd
2 Comments »
Thursday, November 6th, 2008 12:12 AM
Shows all partitions on the HDD
fdisk -l
No Comments »
Tuesday, November 4th, 2008 11:52 PM
Upgrade a rpm package only if it is already installed
rpm -F package.rpm
No Comments »