Wednesday, 25 January 2012

Send email from Terminal --with attachment

Ever wondered how you can send mail from your terminal without the need to open a Browser??? Here is one little trick.  ;)

$ apt-get update

$ apt-get install mutt


$ mutt -s "The mail" xxx@yyy.com -a xxx.pdf < welcome.txt

where The mail is the Heading , xxx@yyy.com is the mail address & xxx.pdf is the 
attachment.....welcome.txtt is the message body






Happy tuxing :)

Monday, 23 January 2012

Downloading Youtube videos using youtube-dl

$ sudo apt-get remove youtube-dl
$ sudo rm /usr/local/bin/youtube-dl
$ sudo wget --no-check-certificate https://github.com/rg3/youtube-dl/raw/2011.02.25c/youtube-dl -O /usr/local/bin/youtube-dl
$ sudo chmod +x /usr/local/bin/youtube-dl
$sudo youtube-dl --update


on some ubuntu machines you might want to change the path to
/usr/bin other than /usr/local/bin  as stated in the above commands where they apply   .... :-)

Usage can be as follows:

youtube-dl -o '%(stitle)s.%(ext)s' 'file_2_download'

e.g youtube -dl -o xxx.mp4 http://www.wtf.xxx/vSadG56Jij

where of course file_2_download is the url of your desired file. An easy way to update your installation is to periodically run:

Tuesday, 13 September 2011

Data Recovery in Linux

The other day a friend of mine wiped out his harddisk,while "ATTEMPTING" to dual boot his machine with Suse Enterprise 11,he almost cried his heart out.we had quite a tweaky weekend that turned out to be a fun afterall.we recovered 99.99999% of the data....!!
Thanks to debian.

Our tools included:
A debian Live cd.
Internet or optionally the Testdisk package.
Frugal
Scalpel
the instructions are quite simple....

Run Testdisk as root
teardrop@teardrop-pc:~#sudo testdisk













Recovering your files,the fun part
PhotoRec
Of the three tools we’ll show, PhotoRec is the most user-friendly, despite being a console-based utility. To start recovering files, open a terminal (Applications > Accessories > Terminal) and type in

teardrop@teardrop-pc~#sudo photorec














Scalpel
Scalpel is a powerful program that, like Foremost, is heavily configurable. Unlike Foremost, Scalpel requires you to edit a configuration file before attempting any data recovery.
Any text editor will do, but we’ll use gedit to change the configuration file. In a terminal window (Applications > Accessories > Terminal), type in:
sudo gedit /etc/scalpel/scalpel.conf

scalpel.conf contains information about a number of different file types. Scroll through this file and uncomment lines that start with a file type that you want to recover (i.e. remove the “#” character at the start of those lines).
Save the file and close it. Return to the terminal window.
Scalpel also has a ton of command-line options that can help you search quickly and effectively; however, we’ll just define the input device (/dev/sda) and the output folder (a folder called “scalpel” that we created on the desktop).
Our invocation is:
sudo scalpel /dev/sda –o scalpel

These tools are lifesavers when something goes wrong with your hard drive. If your data is on the hard drive somewhere, then one of these tools will track it down!

Wednesday, 7 September 2011

Laptop Sound Issues

Ever tried to plug in your headphones after an ubuntu fresh install,then instead of the sound coming out of the headphones alone,it also plays from the laptop's speakers???

Here's a tweak on how to deal with it:

1.Log in as root: sudo -s (then enter the password)
2. In your terminal, add the ppa repositories
sudo add-apt-repository ppa:ubuntu-audio-dev/ppa
then
sudo apt-get update
3. Install the linux-alsa-driver-modules package
sudo apt-get install linux-alsa-driver-modules-$(uname -r)
4. Restart your machine
sudo reboot

Tuesday, 6 September 2011

Unknown File system error rescue grub> error in debian/ubuntu

Today i woke up and found a visitor on my desk...the Devil,(or Diablo as the greeks call him).My computer just froze and told me this!!!!

Unknown file system:
Rescue grub>

It took me a stauning 2hours to fix it!!!! 2 f***king hours!!!
anway this is what idid in anutshell:

In debian squeeze and later:(and Ubuntu inclusive)
1)Boot the ubuntu/Debian live cd
2)click on try ubuntu
3)on booting into the live session
4)open the terminal
5)type sudo -s (no password should be required:so dont worry when it boots into root)
6)type fdisk -l (to check the partition table)
at this point you should be able to know your root partition.
7)type fsck /dev/sdaX ---where X is the prefix of your root i.e dev sda5 (X=5 in this case) Accept all the options as yes.
8)Reboot the machine and all should be well.

Wednesday, 24 August 2011

Just to say

There's only one way to get an employer's attention — with quality. Make sure that your profile stands out from your competition by starting with some key advice:I recently ran a pair of profile-focused posts that should be must-reads for any serious contractor, experienced or new.

9 Easy Ways to Impress Employers



The first post, "Five Ways to Improve Your Profile," offers sharp advice from a real oDesk employer, including:
  • Think of yourself as a product: "Think of your picture and profile as the packaging, your description as the package design (or the copy that gets the potential customer excited about the product), and your skills and knowledge as the features and capabilities of the product."
The second piece, "Four Ways to Create a More Successful Portfolio," helps you showcase your work in a way that will make employers eager to reach out to you. Tips include:
  • Have a portfolio piece for each service you provide. Load at least two or three portfolio pieces for each skill you list on your profile, and make sure the pieces are labeled in a way to indicate those skills.
  • Write a well-written description for each portfolio piece. It's not enough to load up the thumbnail — it's just a thumbnail. Provide a description that is concise, compelling and complete, so the employer knows what she's looking at.
Oh — and the profile is not your only chance to make a good impression. When you're applying, you also have to write the perfect cover letter.
One good cover letter can be downloaded from linkedin.www.linkedin.com search through and ...all should be good!




Oh and by the way...make sure Linux is one of the skills you have....!!!Happy Linuxing.

Thursday, 18 August 2011

Linux Ambassador

Debian-hacks is selling Debian and Ubuntu T-shirts,view the designs below.
For enquiries mail me at koogyz@yahoo.com