Categories
Open Source Solutions Ubuntu

Recovering Deleted Data on Linux…

Imagine this situation -  “you are browsing through your photos on your camera or on your your thumb drive.  You decide to clean up the unwanted photos/data and start deleting files.  All of a sudden you realize you deleted your best photo or that important file. How do you get the data back?”

Firstly dont create any new files or copy any new data on the disk.  This will make sure that the data is recoverable (once the sectors where your file used to reside get overwritten its impossible to recover).

Now there are two simple solutions I found for recovery problems.  Both work best in different situations:

GDDRescue

ddrescue is a simple program that copy bit by bit information form one area of the hard disk to another.  It has loads of amazing features but the one that I like the most is that it ignores unreadable sectors and moves on.  This feature is very useful when recovering movies.  It also makes it easy to recover media files if you have the torrent from which you originally downloaded the file.

sudo apt-get install gddrescue

ddrescue -r 3 /media/cdrom/movie.avi /home/user/movie.avi

In the above command
-r 3 :- makes the program to retry to recover data from a bad sector 3 times and then move on.
/media/cdrom/movie.avi :- The input file
/home/user/movie.avi :- The recovered file

Foremost:

Foremost is a simple application that recovers data from a damaged disk. It goes one step better by sorting out the information for the common file types. The output of Foremost is a directory which has a series of subdirectories where files like jpg, avi, mpg, bmp ect are recovered and stored. This is a perfect application to recover specific data from a disk

To install Foremost use the following command:

sudo apt-get install foremost

To run foremost use the following command:

sudo foremost -i /dev/sdb1 -o /recovery/disk

In the above command
-i indicates the partition/file to be recovered from.
-o indicates the output directory where the recovered files will be stored.

Once the recovery is done you will need to change the ownership of the output directory so that you can read the files. Use the following command to do that:

sudo chown -R username /recovery/disk

Ps: There are more complex methods and applications to do data recovery on Linux. These two are the simplest I have used. Feel free to share your suggestions in the comments.

Categories
Ubuntu

Antivirus in Linux…

Off late I have been looking at Antivirus solutions in linux.  Logically it seems like a great idea to me.  Most of the really bad viruses attack the antivirus system directly and cause major damage to the system, having your AV in a opertating system that is much more secure gives you a better guarantee that you can rescue your system.

There are many antivirus solutions for Linux.  I have personally tried ClamAV and Avast.

ClamAV is a command line tool that makes protecting linux systems a simple affair.  The system was orginally made to scan email attachments and does a great job running in the background.  ClamAV is the prefect soulution for someone who wants to install the AV and let it take care of itself.

To Install ClamAv use the following command in Ubuntu

sudo apt-get install clamav

You can a scan of any folder using the following command

clamscan -r -i -l avscan.txt –move=avscan/. /media/disk

The above command scans the folder “/media/drive” recursively and if an infection is found the original location is stored as an enty in the “avscan.txt” file and the infected file is moved to the folder “avscan”.

Avast Antivirus is the more like the traditional Windows Antivirus.  It has a simple UI for updates and scanning of folders and files.  The learning curve is minimal and the antivius is updated very regularly too.

You can download and install Avast from the following location:

http://www.avast.com/eng/avast-for-linux-workstation.html

Reblog this post [with Zemanta]
Categories
Media Solutions Ubuntu

Joining Videos using Mencoder

Mencoder is an extremely powerful video converter that is capable of converting video from almost any format to any other format.  One of the simplest exercises to do with Mencoder involves joining two videos to make a single video.

To join the videos all you need are the videos and Mencoder installed on your system.  You can install Mencoder on your Ubuntu box using the command

sudo apt-get install mencoder

Now lets say you plan to join videos a.mpg and b.mpg to a video c.mpg

Go to the command line (to the folder containing the videos) and execute the command –

mencoder a.mpg b.mpg -ovc copy -oac copy -o c.mpg

Thats it!  You can join more videos with a single shot but remember that the order in which you have listed the videos the final video will be created in the same order.

Reblog this post [with Zemanta]
Categories
Laptop Ubuntu

Test Drive The All New Ubuntu/Kubuntu Netbook OS


Wubi
Image via Wikipedia

The latest version of (k)Ubuntu comes with a Netbook OS to suit the small screen and moderate horsepower netbook segment of notebooks. The version is light weight and makes good use of the features common between netbooks to get the best out of your netbook.

The official websites recommend you download the iso and create a bootable flash drive using the iso. The step by step method to do it is given in the following links:
Ubuntu – Netbook Remix
KubuntuNetbook Technical Preview


If you are like me and dont want to go thru the process of installing Karmic Koala again, you are in luck… You can test the new Netbook Remix directly from the default desktop install of Ubuntu/Kubuntu.

If you are using Ubuntu you just have to install the “ubuntu-netbook-remix” package. That can be done with the following command:
sudo apt-get install ubuntu-netbook-remix

If you are using Kubuntu you just have to install the “kubuntu-netbook” package. That can be done with the following command:
sudo apt-get install kubuntu-netbook

When you reboot and login you will automatically be taken to the netbook remix of your OS.

PS: The version is one of the earliest releases, so expect updates and more improved performance in the near future.

Reblog this post [with Zemanta]



Categories
Device Open Source Solutions

Downloading Garmin GPS Data in Ubuntu

One of the simplest ways to download Track, Waypoint and Route information from your Garmin GPS in Ubuntu is using gpsbabel.

{adinserter 3}

Install gpsbabel via apt-get

sudo apt-get install gpsbabel

Connect the gps via the cable provided to the serial port of the computer or via a serial to USB converter to the USB port on your desktop/notebook.  To extract the infrormation all you need to do is, execute the following command:

gpsbabel -r -t -w -i garmin -f /dev/ttyUSB0 -o gpx -F data.gpx

The above command copies Routes(-r), Tracks(-t) and Waypoints(-w) from a garmin device (-i garmin) located at Serial-USB interface (-f /dev/ttyUSB0) and saves the info (-o) in the standard gps format (gpx) in the file data.gpx. You can omit the information you dont require and even choose other fromats like kml for google earth:

gpsbabel -r -t -w -i garmin -f /dev/ttyUSB0 -o kml -F data.kml

You should now have a file “data.gpx” which can be used to retrive or map your gps data.

Reblog this post [with Zemanta]