What is MooLux



MooLux is a Live USB Linux distribution based on Slackware that utilizes the KDE desktop environment. MooLux is a portable operating system that can be taken with you containing tools for Internet browsing, email, chat, multimedia, office and software for C, Python, Perl programming tasks. The latest version of Moolux is MooLux-5.4



MooLux 5.4
Moolux is a Linux operating system providing wide colection of useful software with Xwindow system and KDE desktop environment. MooLux is designed to be a full system right out of the box. Moolux has all you need USB Disk 1GB. Now we know all you need is not always all you want. Linux is all about choices, right. Moolux can also easily expand using packages from Slackware or other Slackware 3rd party sites. Included in moolux Is a small collection of simple games. These are not meant to impress, they are just a taste of the real fun you can have with MooLux. Try MooLux for full time and see if you are not impressed with this. And if you find anything that needs improvement let we know. See Screenshot here.

Features

- Based on Slackware 12.2 with kernel 2.6.27.7
- Kernel support Aufs, squashfs, Squashfs-lzma, and Bootsplash
- KDE-3.5.10
- Openoffice.org-3.1
- Kaffeine Media Player-0.8.8 with Full Codecs from Mplayer
- Firefox-3.0.11 with Flashgot, Thunderbird-2.0.0.22, Pidgin-2.5.8 with guification
- K3B-1.0.5 Grsync-3.0.2, Gftp-2.0.18, ktorrent-2.2.7
- gparted-0.3.8, Gslapt-0.4.0
- gimp-2.4.6, qcomicbook-0.3.4,StarDict-3.0.1
- Bluefish-1.0.7,kchmviewer-3.1.2, Supertux-0.1.3
- Wlassistant-0.5.7, KDEBluetooth-1.0-Beta
- and many others……..(see packages list)


Requirement
These are the minimal hardware requirements to run MooLux in with correct performance (some lower configs work, but might be slow) :
- PIV or better, Pentium or AMD are both OK.
- 512 MB of RAM
- No harddisk is required if run Live-USB.
- 1GB space to install Live Mode
- 3GB linux partition space to install Real Mode



Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Git set Proxy in Linux





Once you have obtained the proxy settings (server URL, port, username and password); you need to configure your git as follows:

$ git config --global http.proxy http://:@:
You would need to replace , , , with the values specific to your proxy server credentials. These fields are optional. For instance, your proxy server might not even require and , or that it might be running on port 80 (in which case is not required).

Once you have set these, your git pull, git push or even git fetch would work properly


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

How to install Opera Browser on Ubuntu 18.04 Bionic Beaver Linux




Add Opera browser Repository

Let's start by adding an Opera repository and keyring. Open up terminal and enter:
$ wget -qO- https://deb.opera.com/archive.key | sudo apt-key add - $ sudo add-apt-repository "deb [arch=i386,amd64] https://deb.opera.com/opera-stable/ stable non-free"

Install Opera Browser

At this stage to install the Opera browser on Ubuntu 18.04 Bionic Beaver is easy as executing the below command:
$ sudo apt install opera-stable


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

How To Install Atom Text Editor on Ubuntu 18.04




Atom is an open source cross-platform code editor developed by GitHub. It has a built-in package manager, embedded Git control, smart autocompletion, syntax highlighting and multiple panes.

Under the hood Atom is a desktop application built on Electron using HTML, JavaScript, CSS, and Node.js.

The easiest and recommended way to install Atom on Ubuntu machines is to enable the Atom repository and install the Atom package through the command line.

Although this tutorial is written for Ubuntu 18.04 the same instructions apply for Ubuntu 16.04 and any Debian based distribution, including Debian, Linux Mint and Elementary OS.
Prerequisites

The user you are logging in as must have sudo privileges to be able to install packages.
Installing Atom on Ubuntu

Perform the following steps to install Atom on your Ubuntu system:

Start by updating the packages list and install the dependencies by typing:
sudo apt updatesudo apt install software-properties-common apt-transport-https wget
Next, import the Atom Editor GPG key using the following wget command:
wget -q https://packagecloud.io/AtomEditor/atom/gpgkey -O- | sudo apt-key add -
And enable the Atom repository by typing:
sudo add-apt-repository "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main"
Once the repository is enabled, install the latest version of Atom with:
sudo apt install atom
Source: https://linuxize.com/post/how-to-install-atom-text-editor-on-ubuntu-18-04/

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Introduction to Shell Scripting in Linux



Shell scripting is a way to write programs that run on Unix/Linux systems. It's a powerful skill to have since it allows users to automate repetitive tasks, perform system administration, and do a lot of other things that they would otherwise have to do manually.

A shell script typically consists of a sequence of commands that are executed in a specific order when the script is run. The shell is the program that reads and executes the script. There are many different shells available, but the most common one used for scripting is the Bash shell (short for Bourne-Again SHell).

Creating a Simple Script

Let's start by creating a simple script that echoes "Hello, World!" to the command line. Open up your favorite text editor and type:

#!/bin/bash  
echo "Hello, World!"

Save the file somewhere on your computer and give it a name like hello_world.sh. The first line (#!/bin/bash) is called the shebang, and it tells the shell which interpreter to use. In this case, we're specifying the Bash shell. The second line prints out our greeting using the echo command.

By default, scripts aren't executable, so we need to change the permissions of the file to make it executable. To do that, open your terminal and run the following command:

chmod +x hello_world.sh

This will make hello_world.sh executable. Now we can run our script by typing:

./hello_world.sh

This should print "Hello, World!" to the command line.

Variables

One of the most powerful features of shell scripting is the ability to use variables. Variables allow us to store values that can be used throughout the script. Here's an example:

#!/bin/bash
name="John"
echo "Hello, $name!"

In this script, we define a variable called name and assign it the value "John". We then use the variable within the string passed to the echo command using the $ character followed by the variable name.

Loops

Loops are another fundamental feature of shell scripts. They allow us to execute a sequence of commands multiple times, either a fixed number of times or until a certain condition is met. Here is an example of a loop that prints out the numbers 1 through 5:

#!/bin/bash
for i in {1..5}
do
  echo $i
done

In this script, we're using a for loop to iterate through the sequence of numbers from 1 to 5. The echo command inside the loop prints out the current value of i.

Conditionals

Conditionals allow us to execute different parts of code depending on whether a certain condition is true or false. Here's an example:

#!/bin/bash
name="Bob"

if [ "$name" == "Alice" ]
then
  echo "Hello, Alice!"
else
  echo "You're not Alice!"
fi

In this script, we're using an if statement to check if the value of the name variable is "Alice". If it is, we print out "Hello, Alice!". If it's not, we print out "You're not Alice!".

Conclusion

Shell scripting is a powerful tool that allows users to automate a wide variety of tasks on Unix/Linux systems. With just a few basic concepts, such as variables, loops, and conditionals, you can create powerful scripts that can save you a lot of time and effort. Happy scripting!



Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Configuring Proxies for Yarn, NPM, Git, NVM, Yum, and Apt



When developing applications, it is common to interact with various tools that require a network connection to function correctly. However, many corporate networks use proxies to control access to the internet, which can cause these tools to fail if not configured correctly. In this article, we will look at how to set up and unset proxies for common tools like Yarn, NPM, Git, NVM, Yum, and Apt.

Proxy Setup in Linux
Most Linux distributions rely on either Yum or Apt as their package managers. To configure proxy settings for Yum and Apt-based systems, open your terminal and run the following commands:

YUM
Create a file called '/etc/yum.conf.proxy', which will hold your proxy configuration data:

touch /etc/yum.conf.proxy && chmod 777 /etc/yum.conf.proxy

Edit the newly created file by opening it using a text editor such as 'nano' and adding the following configuration data:

proxy=http://[username:password@]proxy-server-hostname:[port]/

Replace the bracketed terms with your proxy server's details, including your username and password (if applicable) followed by the proxy server hostname and port.

Export the HTTP_PROXY and HTTPS_PROXY environment variables so that all processes have access to the proxy settings stored in the /etc/yum.conf.proxy file, by running the following commands:

export http_proxy="http://[username:password@]proxy-server-hostname:[port]/"
export https_proxy="http://[username:password@]proxy-server-hostname:[port]/"

APT
Edit your '/etc/apt/apt.conf.d/proxy.conf' file using a text editor such as 'nano' and add the following lines of configuration data:

Acquire::http::Proxy "http://[username:password@]proxy-server-hostname:[port]/";
Acquire::https::Proxy "http://[username:password@]proxy-server-hostname:[port]/";

Replace the bracketed terms with your proxy server details, including your username and password (if applicable), followed by the proxy-server hostname and port.

Set up the HTTP_PROXY and HTTPS_PROXY environment variables so that all applications have access to the proxy settings stored in the '/etc/apt/apt.conf.d/proxy.conf' file, by running the following commands:

export http_proxy="http://[username:password@]proxy-server-hostname:[port]/"
export https_proxy="http://[username:password@]proxy-server-hostname:[port]/"

Proxy Setup in macOS
Many developers prefer Macs for coding because the macOS provides better support and flexibility for development. macOS utilizes bash shell, so you must configure proxy settings found in the bash profile file.

Open Terminal application and edit the '.bash_profile' file by running:

nano ~/.bash_profile

Add the following entries to the file:

export http_proxy="http://[username:password@]proxy-server-hostname:[port]/"
export https_proxy="http://[username:password@]proxy-server-hostname:[port]/"

Replace the bracketed terms with your proxy server details, including your username and password (if applicable), followed by the proxy-server hostname and port.

Save the changes made in the '.bash_profile' file and then run the following command to load the new configuration values:

source ~/.bash_profile

Proxy Setup in Windows
Windows users have several ways to configure proxy settings. In most cases, it is essential to adjust the settings for each of the applications individually.

NVM
If you utilize NVM (Node Version Manager) for Windows, modify the registry key named 'HTTP_PROXY' and 'HTTPS_PROXY.'

Launch cmd and navigate through this path

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings

Right-click Internet Settings, select New -> String Value to create two new string values named HTTP_PROXY and HTTPS_PROXY that correspond to the respective environment variables.

Modify the value of HTTP_PROXY/HTTPS_PROXY appropriately, For example,


"http://<proxy>:<port>"

Git
If you’re using Git for Windows, there is an easy way to configure your proxy settings globally.

Open the Git Bash application.

Use the following commands to set up your global Git proxy configuration:

git config --global http.proxy [username:password@]your-proxy-server.com:[port]
git config --global https.proxy [username:password@]your-proxy-server.com:[port]


Replace the bracketed terms with your proxy server details, including your username and password (if applicable), followed by the proxy-server hostname and port.

Yarn and NPM
Yarn and NPM are straightforward as they inherit the environment variable configurations from the operating system's default environment variables.

Configure the proxy value by running the following command:

npm config set proxy http://[username:password@]proxy-server-hostname:[port]/
yarn config set proxy http://[username:password@]proxy-server-hostname:[port]/

Replace the bracketed terms with your proxy server details, including your username and password (if applicable), followed by the proxy-server hostname and port.

Unconfigure by running the same command but with the word “delete” suffix:

npm config delete proxy
yarn config delete proxy

Conclusion
Proxy configurations remain critical to ensuring that tools frequently used by software developers work reliably across any network environment. As we have seen above, configuring proxies for tools like Yarn, NPM, Git, NVM, Yum, and Apt is relatively straightforward once you know what to do.



Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Screenshot Grabbing



Using imagemagick

imagemagick is a collection of tools and libraries for image manipulation. Most distribustions come with imagemagick .
To take a snapshot using Imagemagic:
import -window root screenshot.png
import manual page

Using xv

xv is another image manipulation program that can deal with almost all file formats. xv is not included in distributions installations, but packages are available for most. Example usage:
xv -grabdelay 2 myimage.jpg
xv manual page
using gimp

To grab an image of the screen or a program in Gimp:
File -> Acquire -> Screen shot
using Framebuffer Console

Use fbgrab to grab a screenshot in a framebuffer console.
fbgrab filename.png
using kde

KDE comes with a handy program called ksnapshot that lets you with ease grab a screenshot of your desktop or a single window.
scrot
scrot is a small (66 kB) screen shot grabber based on imlib2. It has lots of options for autogenerating filenames, and can do fun stuff like taking screenshots of multiple displays and glueing them together. thanks to miztic for mentioning it

using xwd

xwd (manual page) is a part of XFree, so chances are high you already have it installed. It can dump screenshots to .xwd files. This is not a common format. After taking a screenshot using
xwd -root -out test.xwd
the only programs I found capable of opening it were Gimp and xwud (manual page). thanks to lude for mentioning it

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Encrypt Filesystems



If you are using modules you need to load these first:
modprobe loop;modprobe cryptoloop;modprobe cipher-aes
Basically you:
losetup -e aes -k 256 /dev/loop0 /dev/partition
You will be asked for a password. Then
mount /dev/loop0 /path/to/mount


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Kill Linux Processes with pkill



One of the best features in Linux is the way you can control processes from the command line, so if you have an application that locks up your GUI, you can always SSH over from another machine and just kill the offending process.

The problem is that if you are killing the same process repeatedly, it’s very tedious to have to figure out the process ID every single time so that you can kill it… so here’s the easier way to do it.

The Old Way

The classic way of killing processes meant you’d first need to use the ps command piped through grep to find the process you are trying to kill:

$ ps -ef | grep swiftfox
geek 7206 22694 0 Dec04 ? 00:00:00 /bin/sh /opt/swiftfox/swiftfox
geek 7209 7206 0 Dec04 ? 00:00:00 /bin/sh /opt/swiftfox/run-mozilla.sh /opt/swiftfox/swiftfox-bin
geek 7213 7209 0 Dec04 ? 00:04:29 /opt/swiftfox/swiftfox-bin
geek 14863 14224 0 18:19 pts/4 00:00:00 grep swiftfox

Then to kill the process, you’d have to use the kill command:

$ kill 7206
The New Way

Instead of going through all of that, you can simply use the pkill command if you already know the process name or part of it.

$ pkill swiftfox
It’s as simple as that. You should note that pkill will kill all processes matching the search text, in this case swiftfox

If you want to see what process names are matched before using the pkill command, you can use the pgrep command. Passing the -l switch tells pgrep to show the process name as well.

$ pgrep -l swiftfox
7206 swiftfox
7213 swiftfox-bin


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Delete Files Older Than x Days



The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them.
find /path/to/files* -mtime +5 -exec rm {} \;
Note that there are spaces between rm, {}, and \;

The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results.
The second argument, -mtime, is used to specify the number of days old that the file is. If you enter +5, it will find files older than 5 days.
The third argument, -exec, allows you to pass in a command such as rm. The {} \; at the end is required to end the command.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

How to use the most popular command in Unix - Grep



grep is by far the most popular command that exists in Unix. Though some may argue about that, but once you begin using grep, it would always be present in all your complex commands that you think of executing at the shell prompt. grep stands for 'global regular expression printer' . Which makes no sense to most.. In sensible words grep extracts those lines from a given text that match the conditions set by the user.

Basically grep lets you enter a pattern of text and then it searches for this pattern within then text that you provide it. It would return all the lines that have the given pattern in them. grep can be used in 2 ways - Either on its own or along with pipes

Using grep on its own
$ grep '12.00' /home/david/backup/log.txt
This command basically shows how you can use grep to extract lines containing a particular string from a text file. (Text files need not necessarily end in .txt) The above command searches for the string 12.00 in the text file specified in the command, and displays all the lines that have this string in them.
The above command could be used to find out all the backups that took place at 12.00 (In case you have a log.txt file in that directory with a list of all the timings for the backups that you have made).
$ grep -v '12.00' /home/david/backup/log.txt
The above command would now show you all the lines in the text file except those that have the string 12.00 in them.
$ grep -l 'delay' /code/*.c
The above command searches for those files that end with a '.c' (within the /code directory) and in which the text 'delay' is present. It only returns the names of these files and not the lines where it found the string.
$ grep -w '\' *
The above commands search for text in a more refined way. The first command searches for those lines where any word in that line begins with the letters 'bay' and the second command searches for those lines where any word in that line ends with the letter 'watch'
-

Using grep with pipes
$ ls -l | grep rwxrwxrwx
As you must be knowing ls -l displays the directory listing for any directory. The grep rwxrwxrwx part of the command extracts only those lines which display the files having their read,write,execute permissions set for user, group and others also. Thus instead of getting a listing of all the files in the directory, you would only see those files that have their r,w,x permissions set for all everybody.

The output of grep can also be piped to another program as follows
$ du | grep 'mp3' | more
You should be able to figure out what the above command does..
$ grep '^#' /home/david/script1 | more
The above command would display those lines (from the file /home/david/script1) that begin with a '#'. The term '^#' means that # should be present as the first character on a line. The more part of the command should be known to you. If not, more basically displays the output a page at a time incase the output exceeds one page.
$ grep -v '^[0-9]' /home/david/backup/log.txt | more
This command searches for lines having any of the numbers from 0-9 in them as the first character on the line. It then prints all the lines except the ones it found initially.

Important : It's necessary to enclose patterns (as used in the above 2 commands) in single quotes so that the shell understands it correctly.Otherwise, the shell may interpret it in another method.

Some extra options for grep

-v
Reverses the normal behaviour of the grep command - Instead of selecting lines, it rejects the lines that match the given criteria.

-c
It supresses the normal output and only prints the total count of matching lines instead of the actual lines.

-i
Ignores the case of the text when matching the given pattern.

-w
Checks if the given pattern is a word by itself and not a part of another word. Thus if you search for 'bay' and the word 'baywatch' is present in a file, the particular line conatining that word would not be returned in the result.

-l
Only gives the names of the files in which the given pattern was found.

-r
Checks for the given pattern , recursively within the directory that you specify after the -r option

I hope this tutorial helps you get started with grep. grep is defintely one of the tools that gives Linux the advantage over other Operating Systems. Using grep effectively along with other tools gives the user a lot of power in Unix.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Setting the PATH in linux



This article explains how set your PATH variable under Linux. This has the same use as that of setting the PATH variable under DOS. Under Linux too, modifying the PATH would add these new directories to your default search path.
So in case you have a particular executable in a particular directory, then if you add that directory to your PATH, then you would only have to type the name of the executable at the prompt rather than then absolute path for that executable. Got it?? Read the example below to figure out what exactly I am speaking about..


Assumption

Suppose you have a program by the name 'tetris' in a folder called /usr/local/games . So in order to run this program you would have to type the following at the prompt
$/usr/local/games/tetris

The above command would execute your program. But typing this every time you want to play this wonderful game makes it slightly cumbersome. It would be much better if you could only type 'tetris'.


Solution

A solution would be to add the /usr/local/games directory to your PATH, so that next time onwards you would only have to type 'tetris' at the prompt rather than the absolute path.

To add this directory to your PATH you have to edit a file called 'bash_profile' that would be present in your Home directory (in Redhat Linux 6.2). So if there is a user by the name David then this file would mostly be found at /home/David/.bash_profile

Note : The period (.) before the name of the file. This period make this file a hidden file. So remember to view hidden files also while seeing a directory listing (This option would be in some menu in X , at the prompt simply use 'ls -a' to see hidden files).

This file would be having a particular line starting with the string PATH. For e.g. the file that I have on my machine has a line such as
PATH=/optional/bin:$PATH:$HOME/bin

To add the directory /usr/local/games to this I would have to modify this line as follows
PATH=/usr/local/games:optional/bin:$PATH:$HOME/bin

Once you have modified this file, save it and then execute it as follows
. $HOME/.bash_profile

Note : To execute this script basically at the $ prompt type a period ' . ' leave a space and then type $HOME/ Once this is done press key. Doing so would replace what ever you have typed with the path to your home directory. Once this happens all you have to do is append a .bash_profile to what is already present at the prompt and finally press

On executing the script you wouldn't see any messages at the output, but then onwards you could simply type 'tetris' at the prompt to execute the program /usr/local/games/tetris
So now you are on the right PATH

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Unmount busy drives



You are probably all too familiar with the situation - you are trying to unmount a drive, but keep getting told by your system that it's busy. But what application is tying it up? A quick one-liner will tell you:
lsof +D /mnt/windows
This will return the command and process ID of any tasks currently accessing the /mnt/windows directory. You can then locate them, or use the kill command to finish them off.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Grabbing a screenshot without X



There are plenty of screen-capture tools, but a lot of them are based on X. This leads to a problem when running an X application would interfere with the application you wanted to grab - perhaps a game or even a Linux installer. If you use the venerable ImageMagick import command though, you can grab from an X session via the console. Simply go to a virtual terminal (Ctrl+Alt+F1 for example) and enter the following:

chvt 7; sleep 2; import -display :0.0 -window root sshot1.png; chvt 1;
The chvt command changes the virtual terminal, and the sleep command gives it a while to redraw the screen. The import command then captures the whole display and saves it to a file before the final chvt command sticks you back in the virtual terminal again. Make sure you type the whole command on one line.

This can even work on Linux installers, many of which leave a console running in the background - just load up a floppy/CD with import and the few libraries it requires for a first-rate run-anywhere screen grabber.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Finding the biggest files



A common problem with computers is when you have a number of large files (such as audio/video clips) that you may want to get rid of. You can find the biggest files in the current directory with:

ls -lSrh
The "r" causes the large files to be listed at the end and the "h" gives human readable output (MB and such). You could also search for the biggest MP3/MPEGs:

ls -lSrh *.mp*
You can also look for the largest directories with:

du -kx | egrep -v "\./.+/" | sort -n


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Using ODBC with bind



I ran into this last week, and the Google was failing me, so here's the reason why you sometimes get "Required token $zone$ not found." when debugging why bind won't start with ODBC. The answer is: because the DLZ documentation is slightly wrong. It delimits "zone" and "record" with % instead of $. That is, the directions show:

{select zone from dns_records where zone = '%zone%'}
But really, it should be:

{select zone from dns_records where zone = '$zone$'}
There you go. That's where that error comes from. Now hopefully the next person who hits this will be able to find an actual useful answer when they search for the error.

source: http://ubuntulinuxtipstricks.blogspot.com/2010/10/using-odbc-with-bind.html

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Backing up Master Boot Record



The MBR is a 512 byte segment on the very first sector of your hard drive composed of three parts: 1) the boot code which is 446 bytes long, 2) the partiton table which is 64 btyes long, and 3) the boot code signature which is 2 bytes long.
The core of the backup command is dd—which will be familiar to every system administrator, especially to those who intend to clone an entire hard disk. To see all the options type man dd. As we want to back up only the first 512 bytes we need to append some arguments to it. Here is the full command you need (and remember to run it as the root user, su (and sudo for Ubuntu users):

dd if=/dev/hda of=/home/richmondg/mbr_backup bs=512 count=1
Restoring the MBR
You can use a live CD to access your hard drive and read the backup off any removable media such as a USB stick. Here is the command:

dd if=/dev/sda/mbr_backup of=/dev/hda bs=512 count=1
Again, amend sda to read where you saved the MBR and run the command as root. If you wish to kill the MBR altogether, including the partition table, then you can overwrite it with a series of zeros:

dd if=/dev/zero of=/dev/hda bs=512 count=1
If you want to kill the MBR but leave the partition table intact then simply change 512 to 446.
Another way to repair the mbr of your HDD device is install LILO then type (replacing x with the letter of your HDDdevice) :

lilo -M /dev/sdx


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Batch resize images using the command line in Linux



If you have a ton of images that need resizing, you can do it all with the imagemagick package:

cd /home/user/images
mkdir resized_images
cp /home/user/images/* /home/user/images/resized_images

Now that you have a copy of the files in resized_images, time to resize them all:

mogrify -resize 800 *.jpg

This will resize them all to a width of 800px while keeping the aspect ratio. If you want a fixed image size, you can specify it like this:

mogrify -resize 800×600! *.jpg



Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

How to Find duplicate files



Let’s say you have a folder with 5000 MP3 files you want to check for duplicates. Or a directory containing thousands of EPUB files, all with different names but you have a hunch some of them might be duplicates. You can cd your way in the console up to that particular folder and then do a

find -not -empty -type f -printf “%s\n” | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate

This will output a list of files that are duplicates, according tot their HASH signature.
Another way is to install fdupes and do a

fdupes -r ./folder > duplicates_list.txt

The -r is for recursivity. Check the duplicates_list.txt afterwards in a text editor for a list of duplicate files.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Samsung has made Galaxy Tab’s launch date for the UK market official




Samsung has made Galaxy Tab’s launch date for the UK market official. Its first Android-powered tablet will go on sale nationwide on November 1, which also happens to be Samsung’s 41st anniversary.

Samsung says the device will arrive on major networks as well as to stores like Carphone Warehouse, Dixons Store Group but has failed to mention the price except claiming to be available in “range of attractive price packages.”

Full Specifications:
Network: 2.5G (GSM/ GPRS/ EDGE) : 850 / 900 / 1800 / 1900 MHz; 3G (HSUPA 5.76Mbps, HSDPA 7.2Mbps) : 900 / 1900 / 2100 MHz
OS: Android 2.2 (Froyo)
Display: 7.0 inch TFT-LCD, WSVGA (1024 x 600)
Processor: Cortex A8 1.0GHz Application Processor with PowerVR SGX540
Camera: 3 MP Camera with Auto-Focus and LED Flash; 1.3MP front camera for Video Telephony
Value-added Features: Android Market™ and Samsung Apps for more applications and contents; Readers Hub; Media Hub*; Music Hub*; Social Hub; *Availability will be decided by market preference.; Adobe Flash 10.1 player support; Full HD video playback; Thinkfree Office; Swype; Hybrid Widget
Connectivity: 30 pin connector
WiFi 802.11n / Bluetooth® 3.0
Sensor: Gyroscope sensor, Geo-magnetic sensor, Accelerometer, Light sensor
Memory: 16G / 32G internal memory with up to 32G external memory slot
RAM: 512 MB
Size: 190.09 x 120.45 x 11.98mm, 380g
Battery:4,000mAh (7 hour movie play)

source: http://www.samsunghub.com/2010/10/01/galaxy-tab-coming-to-uk-on-november-1/

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Popular Posts