Archive for May, 2008

Change the Shell

Use this command to change the default shell you are using.


chsh

Mount Windows Network Share with Samba

Use this command to mount a share on a windows system. It uses Samba.


mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share

Sort and Unique

Sort contents of a file and remove repeated lines


sort file.txt | uniq

Restore Backup Created by dump

Restoring a backup created by the dump command.


restore -if home_backup.bak

A Shell Script to Create a Build of Firefox Extension

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"

Show all Installed Packages in Debian

Show all deb packages installed on the system


dpkg -l