Eclipse – “Too many open files” Problem

If your OS is Linux and you are using Eclipse, you might possibly see the following error messages or similar on certain time. This may result by installing many plugin or other reasons.
This is because there are too many files opened and these are more files than the number of open files allowed . So Eclipse cannot open more files and displays the errors above.
Let’s see the number of open files.
$ lsof | wc -l


$ lsof | wc -l

In my case, it was 9028.

Now check the limitation of open files

Now check the limitation of open files
$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31226
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 31226
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

To change it, open the file /etc/security/limits.conf and put a greater number than 1024 depending on the number of open files you checked with lsof | wc -l just before.
For example,
Open the file
$ gksudo gedit /etc/security/limits.conf
add these lines
*                soft    nofile          9216

*                hard    nofile          9216

Log out and in then check with ulimit. It should show like this.
For more detail view in below page,


Vi commands: Simple and Quick tutorial

VI is a display oriented interactive text editor originally created for the Unix operating system. It is available by default on all UNIX systems. It is supplied with all Linux distributions.

Here is a simple and quick VI command tutorial.

Note: VI commands are CASE SENSITIVE.


There are two modes in vi: command mode and insert mode.
All vi commands work on command mode.

– Hitting Esc will put you in command mode
– Hitting i and a in command mode will put you in insert mode.
– Hitting i will insert text before the cursor
– Hitting a will append text after the cursor

Creating new file

– Open terminal (In Ubuntu, press: CTRL + ALT + T)
– Type the following command to create new file named hello.txt:
vi hello.txt

vi -r filename = recover filename that was being edited when system crashed

Saving file

– After you enter some text to your file, press Esc
– Then type “:w” (without quote)

Exit vi

– press Esc
– type “:q” (without quote)

:wq = save any changes and quit vi
ZZ = save any changes and quit vi
:q! = quit vi even though latest changes have not been saved

Moving Cursor

– h j k l will move cursor left, down, up, right respectively
– 0 (zero) will move cursor to start of current line
– $ will move cursor to end of current line
– w e b will move forward one word, forward to next end of a word, and back one word, respectively
– :0 (zero) or 1G will move cursor to first line in file
– :n or nG will move cursor to line n
– :$ or G will move cursor to last line in file

Moving through screen

CTRL f will move forward one screen
CTRL b will move backward one screen

Deleting Text

x = delete single character
dd = delete entire current line
dw = delete single word beginning with character under cursor
db = delete word backward
D = delete the remainder of the line, starting with current cursor position
d$ = delete from cursor to end of line (same as D)
d0 = delete from cursor to beginning of line
dL = delete from current line to end of screen
dG = delete from current line of end of file
d) = delete complete sentence forward
d( = delete complete sentence backwards

Undo and Redo

u = undo last command
. (dot) = redo/repeat last command

Copy and Paste

yy = copy current line
yw = copy word forward
yb = copy word backward
Y = copy the remainder of the line, starting with current cursor position
y$ = copy from cursor to end of line (same as Y)
y0 = copy from cursor to beginning of line
yL = copy from current line to end of screen
yG = copy from current line to end of file
y) = copy from cursor to start of sentence
y( = copy from cursor to end of sentence
p (lowercase) = paste to the line below the current line
P (uppercase) = paste to the line above the current line
Lines and words deleted from dd and dw can also be pasted.


/string = search forward for occurence of string
?string = search backward for occurence of string
n (lowercase) = find the next occurence of the search
N (uppercase) = find the previous occurence of the search

Find and replace

:%s/foo/bar/g = replace all occurences of foo with bar in the entire file

s = substitute
g = global, i.e. the action should be performed for all instances of a string found on any given line
% sign = “Do this for all lines in this buffer.”

Other find and replace commands:-

:s/foo/bar/ = replace the first occurrence of the word foo on the current line with the word bar.
:s/foo/bar/g = replace all occurrences of the word foo on the current line with the word bar.
:%s/foo/bar/g = replace all occurrences of the word foo in the current file with the word bar.
:%s/foo//g = delete all occurrences of the word foo in the current file.

Reading and writing to file

– Open terminal
– Type vi and hit enter
– :r filename = read file named filename
– :w newfile = write the recently read content to newfile

Set commands

:set nu = display line numbers
:set nonu = cancel line number display
:set ts=4 will set the number of spaces used to display the tab character to 4
:set ic = make string searches with / ignore cases
Example: After :set ic using /foobar will find foobar as well as FooBaR

Shell operations

We can execute any shell command inside vi itself.

:!command = execute command without leaving vi
Example: :!date = display date

We can start a new command shell inside vi itself.

:sh = start a new command shell inside vi
Type exit to leave that shell and return back to vi.


Copied from :

Adsense Tips and Tricks

“Do You Know the Way to Earn Hundreds of $ in Just One Hour or Even Less” “Here we will show you the fastest, Easiest way to get your slice of the Cash-Filled Google AdSense Program” Even While You’re Sleeping! The latest online money-making strategy is Google’s AdSense and AdWord programs. Each can improve your income, but first you need to know how they work.

One of the latest online money making strategies is to use Google’s AdSense and or to use Google’s AdWord programs. Each of these programs has the potential to improve your cash flow, however, you need to know how these programs work before you can make a realistic estimate about the kind of money you will be able to earn, and before you can determine which program(s) is/are best for you. AdSense is a marketing affiliate program where you place specially selected Google-generated advertisements on your web page that reflects the information and content of your web page. In return for hosting these ads you are paid based on the number of ad images, click throughs, or purchases made because of your web page. Google’s AdSense program automatically matches the best possible advertisements with the content on your Web page, making the ads magically quite relevant to your content.

What makes this more interesting is that advertisers don’t pay to have their adverts show up on either Google or separate content sites, but instead pay when the ads are clicked by customers, what we call “pay per click” or PPC. A percentage of the amount that the company pays Google for displaying the ad is then shared with the AdSense-enabled web site owner.

Website owners pay Google to display these ads and are charged a predetermined amount every time their ad gets clicked by a web surfer. With the AdSense program, you will display these same text ads on your site just like Google and get paid for it as well.

All you do is copy and paste some provided HTML code into your pages and Voila! The ads will show up. Every time an ad is clicked on your site, you will receive a certain percentage of what Google receives from the advertiser. Once your account reaches $100, you’ll receive a check in the mail.

Google does not disclose exactly how much you’ll earn per ad that is clicked. The commission you receive per click depends on how much advertisers are paying Google for the particular ad. You will earn a share of that amount. I’ve heard of earnings anywhere from 2 cents to $15 per click. The amount you’ll earn also depends largely on the amount of targeted traffic you receive to your own site, how well the ads match your audience’s interests, the placement of the ads on your pages, and of course the amount you receive per click.

To become an affiliated member of AdSense you first will be required to fill out an application. Once your application is approved you will receive a block of HTML code that you will need to program into your website so that AdSense will be able to run and be able to be tracked on your website.

There isn’t a fee to participate in AdSense, however, you do need to invest time in setting up AdSense features and filters. You will also have to pay for the design, hosting, and domain name of your website. In order for you to make money, you will need to attract visitors to your website. To do this you will need to provide your viewers with quality content that appeals to a large audience. One popular way to do this is to provide a blog of current events, issues, opinion, commentary, etc. Another way is to produce original content that people will drool over. Be creative. There is a lot of competition out there, so learn how to produce content that will top the search engine results, and learn how to use keywords to your advantage in order to attract more viewers.

Important Warning: Do not click on your ads!

I think one of the most common mistakes that new AdSense participants make is to click on an advert or three to “make a quick buck”. Sounds good in theory, but you’ll end up kicked out of the AdSense program if you click on ads shown on your own pages, which is not a good strategy for earning money! Once your AdWords account has been set up and activated, and your billing information has been entered, your ads will then be up and running within a matter of minutes. To maximize your benefits with AdWords, you will need to design advertisements that meet all of the requirements that they set out, as well as create a concise ad that tells your potential customers exactly what you offer. Anyway, it’s simple, easy to accomplish, you never have to negotiate (or even talk) with advertisers, you don’t have to bill anyone at all, and every month or two you’ll get a nice little check from Google corporate.

Starting Right Now, its fast, it’s easy and most importantly, and it is a proven-successful strategy for making fast money online. Don’t waste hours of time or tons of money using information that may or may not work! So what’re you waiting for? Let’s get started!