Thursday, October 29th, 2009 11:30 AM
This script will run check for ubuntu launch once every 5 mins and let you know if there is an launch.
while [ 1 ]; do if [ -z "`curl -I "http://cdimage.ubuntu.com/releases/9.10/release/"|grep "404"`" ]; then kdialog --msgbox "9.10 Released"; exit; fi; sleep 300; done
No Comments »
Thursday, July 2nd, 2009 11:17 PM
Use this command to create a random password
< /dev/urandom tr -dc A-Za-z0-9_ | head -c8
Also see…
No Comments »
Wednesday, May 13th, 2009 11:50 PM
A Shell Scirpt to Mount ISO files – call it using the command moustiso.sh ImageFile.iso. You need a folder called /mnt/Image for this to work
#!/bin/sh
sudo mount -o loop "$*" /mnt/Image/
3 Comments »
Saturday, February 21st, 2009 11:28 PM
Command to know if you have to remote into another box
chsh --list-shells
4 Comments »
Monday, February 9th, 2009 11:26 PM
Show all the variables in the shell.
env
No Comments »
Monday, February 2nd, 2009 11:39 PM
Change shell command
chsh
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
1 Comment »
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 »
Saturday, May 17th, 2008 11:05 PM
Use this command to change the default shell you are using.
chsh
No Comments »
Sunday, May 4th, 2008 11:03 PM
This shell script will create a build of a firefox extension in linux. This is created according to my details(eg, the guid has @binnyva.com in it) – but you can modify it and use it yourself.
app=$1
folder=$2
if [ $# -eq 0 ] ; then
echo "Useage: sh build.sh []"
elif [ $# -eq 1 ] ; then
folder="$1@binnyva.com/"
fi
rm $app.xpi
cp -r $folder temp
cd temp
rm -rf .git
zip -r $app.xpi .>/dev/null
mv $app.xpi ..
cd ..
rm -rf temp
echo "Built $app successfully"
No Comments »