Posts Tagged With: command

Import All MySQL Sql Dumps in a Folder

Tagged with: , , , , , , , , , ,

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 »

Configure Gateway

Tagged with: , , , , , , ,

Configure the default gateway


route add -net 0/0 gw IP_Gateway
No Comments »

Spy on SSH Users

Tagged with: , , , ,

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 »

Find Link Status

Tagged with: , , , , , ,

Show link status of all interfaces


ip link show
No Comments »

Shell Script for Batch Convertion of Images

Tagged with: , , , , , ,

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 »

Rip Audio CD to Wav

Tagged with: , , , , , , ,

Rip audio tracks from a CD to wav files


cd-paranoia -B
No Comments »

Burn Compressed ISO Image

Tagged with: , , , , , , , , , ,

Burn a compressed ISO image


gzip -dc cd_iso.gz | cdrecord dev=/dev/cdrom
No Comments »

Search Debian Package

Tagged with: , , , , , ,

Show all deb packages with the name “httpd”


dpkg -l | grep httpd
2 Comments »

Shows all Partitions

Tagged with: , , , , ,

Shows all partitions on the HDD


fdisk -l
No Comments »

Update an Installed RPM Package

Tagged with: , , , , ,

Upgrade a rpm package only if it is already installed


rpm -F package.rpm
No Comments »