Saturday, 14 April 2012

Ubuntu 11.10 – Understanding sudo apt-get install


Ubuntu 11.10 – Understanding sudo apt-get install

This tutorial is for Ubuntu 11.10, however, it should be the same for  other versions of Ubuntu (and derivatives, like edubuntu, kubuntu,  lubuntu, and xubuntu) and other Linux distributions based on Debian.


However, no guarantee is made.
What makes Ubuntu very easy to use is the Ubuntu Software Center  which allows users an easy way to select and install or remove packages  (usually programs).
However, when you search the web looking for help with Ubuntu, often times you see something to the effect of:



Enter the following command:
sudo apt-get install lubuntu-desktop
While this is clear for those who know what it means, I believe the  majority of Ubuntu users are those who want a simple to install and use  Linux OS – they are not interested in lower level details of managing  their system.

In most cases, you can enter the package name into the Ubuntu  Software Center and install it that way. For example, if you found the  instructions: sudo apt-get install lubuntu-core and didn’t want to use apt-get you could enter lubuntu-core into the search field of Ubuntu Software Center and select the appropriate package from there.


Advantages of using apt-get
When you use the Ubuntu Software Manager, all the details of the  installation are hidden from you – you don’t know if you are installing  just one package or twelve.
Using apt-get, you can see which packages are going to  be installed. This also makes it easier to know which packages to  uninstall if you uninstall later.

A common complaint about Microsoft Windows is that applications often  install a lot of junk that is not removed when the application is  uninstalled. Ubuntu isn’t any better in this regard. This is because  installers and uninstallers are hard to write – when you uninstall you  don’t want to accidentally remove packages or files that some other  application is using, so uninstallers tend to be conservative and leave  stuff behind.


Another advantage of using apt-get instead of the Ubuntu Software Center is that apt-get  allows you to install multiple packages with a single command. With the  Ubuntu Software Center you need to install each package separately.


For example, if I want to install the astronomy packages Stellarium and Celestia GNOME using the Ubuntu Software Center, I need to install each separately. Using apt-get, I can install both from the same command by separating them with a space:
sudo apt-get install stellarium celestia-gnome


What it is
The command is really two commands:
sudo – a command to grant super user  access to the system. Ubuntu is configured to prevent administrative  (or system level) changes to the operating system. This is a security  measure. sudo allows a user to temporarily override this behaviour.
apt-get – the Advanced Packaging Tool which allows users to install, remove, and update packages on their system.
Using apt-get

Instructions on how to open a terminal can be found here.
1) Type the command and press Enter (in this case, I am installing the package stellarium):

2) Type your password and press Enter. Note:  as a security measure, your keystrokes are not echoed back to you. You  will be typing, but see no feedback on the screen. While weird, this is  normal.

3) Examine the install information (if you like):

The install information shows you the following:
Any extra packages that will be installed along with the selected package (yellow)
The list of packages to be installed this includes the package you are installing along with any extra packages needed (green)
A summary of (1) number of packages being upgraded, (2) number of  new packages being installed, (3) number of packages being removed, (4)  number of packages that are unaffected (red)
How large the download will be (blue)
How much disk space will be used by the installation (grey)

apt-get may display additional information, but, for this tutorial, it is not relevant.
4) If you want to go ahead with the installation, press Enter. If you changed your mind, type n (upper or lower case – it doesn’t matter) and press Enter,
5) Wait for the installation to finish. During installation, you will see downloading information and installation information:

Thanks Hope you Like it 

Check Your All Browser History From One Location

Browsers, which is our gateway to internet to connect , all  information in form of cookies and browser history that they can be both boon and bane depending on the situation.
If you use multiple browsers for different browsing purpose then checking history of each of them can be boring and time consuming. Hence we share this wonderful tool called Browser History Spy that can help you here. This Windows-only tool provides a single interface to look into the histories of Internet Explorer, Google Chrome and Mozilla Firefox (hope that list will
expand quickly). Let us see how it works.



After having downloaded the application there are two things you may do. One, install the application for regular use. Two, use the portable version to give it a try. By portable you must have already guessed that you can run the exe from external drives as well.

Tuesday, 10 April 2012

Top 10 Things To Remember Before Hacking

I`m tired of the ISP storing all my data and I`m tired of all the unsafe ways of being a hacker. So this Article will show you  [Top 10 Things To Remember Before Hacking ]
There aren`t any  antiviruses that protect you, you have to protect yourself.
Nr. 1 
Backup all your Manuals, scripts and personal data like pics and vids and passwords on an encrypted drive (at least more than 124 bit encryption to get anything out of it)

Nr. 2 
Always (if you have windows) have your firewall off. Get yourselves some private firewall on the internet, there are literally tons of them out there on the interwebs.
Nr. 3 
Always communicate with servers on the interweb with an encrypted proxy address, never use your local. (cause your ISP is monitoring and storing every bit you are uploading and downloading on the net).
Nr. 4 
Never tell or use your real name or give your address to anyone on the internet (hackers live to catch these informations)
Nr. 5
Never download or visit a link you get from a stranger (even on your hotmail, gmail or facebook)
Nr. 6 
When you use any program to download or doing P2P communication "torrent". Always use different ports then what the program is set for. Cause there are always reverse engineers doing the opposite of what its ment for. for example firesheep is to capture passwords on your network, but blacksheep is to find people using firesheep.. get me? run in stealth mode
Nr. 7
Always have a USB pen next to you. If you need another OS running or an offline antivirus scan.
Nr. 8
Never feel sorry for anyone on the internet. The text can be tempting but never give yourself in. Stay sharp and strong, hacking isn`t funny business, it is serious and peoples "private" lives are at stake.
Nr. 9 
Don`t tell your friends what you do, it can be tempting. But if you do they will be scared of you and they will try to avoid you.
Nr. 10
Don`t trust your government, they rule you, but don`t let them. Stay firm and protect yourselves. Stand up for what you believe in.
Took me lie 8 mins to make this, so cmon give me 2 secs of your day and post what you think.
If you have any question, just ask and I will be back to you.

Saturday, 7 April 2012

Backing up a linux machine remotely (another Linux Machine/Server)





If you need to backup your Linux Machine/Server to some remote place (another Linux Machine/Server), you may use the the following tools.

rsync (recommented) To find out more about rsync follow these links:

http://library.linode.com/linux-tools/utilities/rsync
http://blogs.warwick.ac.uk/chrismay/entry/idiots_guide_to/
And if you need an easy to be used GUI for rsync:

http://www.makeuseof.com/tag/grsync-simple-gui-rsync-easily-linux/
bacula - "Bacula is a set of Open Source, computer programs that permit you (or the system      administrator) to manage backup, recovery, and verification      of computer data across a network of computers of different kinds.  Bacula is relatively easy to use and efficient, while offering many advanced storage management features that make  it easy to find and recover lost or damaged files."
http://www.bacula.org/en/
http://www.bacula .org/en/rel-manual/Brief_Tutorial.html
http://www.linuxquestions.org/questions/linux-server-73/backup-using-bacula-662727/
http://www.linuxplanet.com/linuxplanet/tutorials/6585/1
scp -
http://en.wikipedia.org/wiki/Secure_copy

Friday, 6 April 2012

Ebook Ritchie Kernighan.pdf for c


The C Programming Language by Ritchie Kernighan.pdf
---------------------------------------------------------------------------
Free download from this link:
http://www.filesin.com/C14B5189424/download.html
------------------------------------------------------------------

Tuesday, 3 April 2012

Advanced Shell Script . [Back up]


#!/bin/bash
# Shell script (BASH) to backup the selected directory on server and upload
to
# another ftp server securely. This script uses the gpg command to
# encrypt the .tar.gz file before upload take place.
#
# In order to run this script you must have following tools installed:
# - /usr/bin/ncftpput
# - /bin/tar
# - /usr/bin/mail
# - /usr/bin/gpg
#

# Script also mails back the ftp operation failed or not
#
# Installation:
# Customize the script according to your need. You need to setup ftp
# server, password etc. Next, you need to setup gpg user name and
# import public key so that you can encrypt the files. Usually following two
# commands needed for gpg:
# gpg --import userkey
# gpg --edit-key KEY_ID|USER_ID
# Command>trust
#
# --------------------------------------------------------------------
# This is a free shell script under GNU GPL version 2.0 or above
# Copyright (C) 2005 nixCraft project.
# Feedback/comment/suggestions : http://cyberciti.biz/fb/
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# Dirs to backup, Separate multiple directories using space
# for example /home /www /data2
BACKUP="/home"
# Remote ftp server
FTPH="ftp.backup.com"
# Remote ftp user name
FTPU="ftpusername"
# Remote ftp user password
FTPP="secret"
# Local gpg user_id
GPGU="nixcraft"
# Remote directory, blank for default remote dir
# If dir does not exist it will be created automatically by ncftpput :)
FTPD="backup/"
# Temporary directory to store tar.gz file and process it
TMPD="/tmp"
# Mail message
# Admin email me@mycorp.com or pager@yourmobile.com
MTO="support@mycorp.com"
# Mail subject
MSUB="Backup $(hostname) report"
# Admin info, URL email id; change it according to your need :)
ADMIN_INFO="For support visit http://cyberciti.biz/fb/ or write an email to
nobody@cyberciti.biz"
# Only change if your UNIX stores bin in diffrent location
NCFTP="/usr/bin/ncftpput"
TAR="/bin/tar" # must be gnu tar
MAILC="/usr/bin/mail"
GPG="/usr/bin/gpg"
#######################################################################
# Do not change anything below
#######################################################################
FILE="$(hostname).$(date +"%d-%m-%Y").tar.gz"
OUT="$TMPD/$FILE"
FOUT="$OUT.gpg"
MFILE="/tmp/ftpout.$$.txt"
MESS=""
if [ ! -x $TAR ]; then
echo "$TAR command not found, contact $ADMIN_INFO"
exit 1
fi
if [ ! -x $NCFTP ]; then
echo "$NCFTP command not found, contact $ADMIN_INFO"
exit 1
fi
if [ ! -x $GPG ] ; then
echo "$GPG command not found, contact $ADMIN_INFO"
exit 1
fi
$TAR -zcf $OUT $BACKUP
if [ $? -ne 0 ];
then
MESS="$TAR failed to create backup. Nothing uploaded to remote FTP $FTPH
server"
else
# Encrypt the .tar.gz file before upload
$GPG -e -r $GPGU -o $FOUT $OUT
$NCFTP -m -u "$FTPU" -p "$FTPP" "$FTPH" "$FTPD" "$FOUT"
OSTAT="$?"
case $OSTAT in
0) MESS="Success.";;
1) MESS="Could not connect to remote host $FTPH.";;
2) MESS="Could not connect to remote host $FTPH - timed out.";;
3) MESS="Transfer failed.";;
4) MESS="Transfer failed - timed out.";;
5) MESS="Directory change failed.";;
6) MESS="Directory change failed - timed out.";;
7) MESS="Malformed URL.";;
8) MESS="Usage error. May be your version of ncftpput ($NCFTP) is
old";;
9) MESS="Error in login configuration file.";;
10)MESS="Library initialization failed.";;
11) MESS="Session initialization failed.";;
*) MESS="Unknown error, contact admin $ADMIN_INFO";;
esac
fi
>$MFILE
echo "Backup status for $(hostname) as on $(date):" >>$MFILE
echo "" >>$MFILE
echo "Backup File : $FOUT" >>$MFILE
echo "Backup ftp server : $FTPH" >>$MFILE
echo "Backup status message : $MESS" >>$MFILE
echo "" >>$MFILE
echo "-- Automatically generated by $(basename $0)" >>$MFILE
# send an email to admin
$MAILC -s "$MSUB" $MTO <$MFILE
# remove the files
[ -f $MFILE ] && rm -f $MFILE || :
[ -f $FOUT ] && rm -f $FOUT || :
[ -f $OUT ] && rm -f $OUT || :

Thursday, 29 March 2012

Convet Your Email Into Doc Pdf Dont Copy Paste


So I'm always excited when Google, the company announced a new feature in Gmail Labs that adds a "create a document" link to your email menu.

When you open an email and click the document link, the message will be exported as a Google Document. From there you can edit it, share it, or download it as a Word, PDF, or RTF file.

In order to enable the feature, just click the Gmail Labs icon (it looks like a beaker and hangs out next to the settings link in the top right side of your Gmail homepage) and scroll down until you see the Create a Document option. Click enable and Gmail will reload with the feature enabled.