Posts

Showing posts with the label Linux

A shell script for Renaming large number of files in Linux

Image
Hi, today I'm going to Blog about a very simple shell script, that may help you guys a lot.NO big deal, its very simple one. It was very helpful to me, once I had to rename a large number of images of Kim Kardashian.  So then I realise it will very easy doing it with a Shell script rather than manually rename it. #!/bin/bash # # Author: Gihan De Silva @  gihansblog.com # rename script # rename.sh clear x=0 for i in `ls *.jpg` do x=`expr $x + 1` mv $i Kim_Kardashian$x.jpg done echo "rename done!" Code Explanation! #!/bin/bash  This is how always a shell script starts. clear This line clears all the things already in the terminal window. x=0 This line define and declare a variable. for i in `ls *.jpg` This line starts a loop and, it will list down all the JPEG(jpg) type images. x=`expr $x + 1` This line increases the value of x by 1 . mv $i Kim_Kardashian$x.jpg This line renames all the files according to a sequence like, Kim_Kardashian1.jpg , Kim_Kardashian2.jpg, Kim_Kard...

How to install and configure Android SDK with Eclipse on Ubuntu 11.04

Image
Hi, today I'm going to tell you how to install and configure Android Software Development Kit with Eclipse on ubuntu 11.04 environment. These days Android application developing has became major trend. So as application developers we should also consider about new trends. To set up a computer in order to develop Android applications we need 4 things. Java Development tool Kit (JDK) Eclipse IDE Android SDK for Linux(i386) Android plug-in for Eclipse Ok now I assume you have downloaded and installed JDK and Eclipse or already have both of them. Now extract the Android SDK into a safe location , (keep this on your mind, that downloaded Android SDK is not a full development environment. It only contains the core libraries. When configuring it with Eclipse you need to download at least one of the android developing environments.) Then start Eclipse ,to install the android plug-in for eclipse. Then go to Help --> Install New Software Click Available Software Sites as shown...

Some Useful important things about XAMMP for Linux

Hi, today I'll mention some important things on XAMPP. How to set XAMPP to start up programs (XAMPP will automatically starts with the computer starts) First login as root user Now press (Clrt+Alt+T) to open Terminal window then type sudo -s -H then enter this command, command: sudo ln -s /opt/lampp/lampp /etc/init.d/lampp                     sudo update-rc.d -f lampp defaults Uninstall XAMPP First login as root user. then use this on terminal, command: rm -rf /opt/lampp ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Start XAMPP command: /opt/lampp/lampp start Stop XAMPP command: /opt/lampp/lampp stop Stop and start XAMPP command: /opt/lampp/lampp restart Start only the Apache command: /opt/lampp/lampp startapache Start the Apache SSL support command: /opt/lampp/lampp startssl Start only the MySQL database command: /opt/lampp/lampp sta...

How to install XAMPP on Linux (Ubuntu 11.04) Part #2

Image
Ok this is the second part of the previous post.If you haven't read the first part " How to install XAMPP on Linux (Ubuntu 11.04) " please read it before come to this :D . Today I'll tell you how to configure MySQL databases (phpMyAdmin). Because config.inc.php is not set to your Linux username so,you are not still allowed to goto the phpMyadmin page. First you should get open the terminal and login as root user. Now press (Clrt+Alt+T) to open Terminal window then type sudo -s -H command: cd /opt/lampp/phpmyadmin Now you are in the phpmyadmin directory, you need to change the ownership of the file config.inc.php to your own Linux username. command:chown your_user_name : your_user_name config.inc.php Ok now there is one thing to do.That's Configure Linux XAMPP Security In this case too you need to login as root user(only if already logout).Now lets set up the security. command: /opt/lampp/lampp security Then the terminal will be ask some questions , type " ...

How to install XAMPP on Linux (Ubuntu 11.04)

Image
Hi, this is my second post.In first post I mentioned about how to run & configure XAMPP on windows computer . XAMPP may be the best server to PHP. Now its time to move into Linux. Currently I'm using Ubuntu 11.04 Natty Narwhal edition. Based on that I'll show you how to install XAMPP on Linux OS. Earlier day the Linux version of XAMPP called as LAMPP. But it comes as XAMPP with more improvements. Ok, First of all you need to download the XAMPP for Linux form Apachi Friends. here is the link for it : http://www.apachefriends.org/en/xampp-linux.html Before installation , its better to have a MD5 check.To do that you need to login as root user. 1) Now press (Clrt+Alt+T) to open Terminal window then type sudo -s -H it will ask your password after that 2) type md5sum xampp-linux-1.7.4.tar.gz the displaying MD5 should be 7d83c9829d8c79d43ea607e5b009dc58 3) Now you should extract the downloaded archive file to /pot directory command: tar xvfz xampp-linux-1.7.4.tar.gz -C /opt Y...