Sunday, September 30, 2012

to delete files in linux using command

Tip for File Deletion:

When we try to delete a large amount of file using single linux command, we get error as:

/bin/rm: Argument list too long.


The problem is that when you type something like “rm -rf *”, the “*” is replaced with a list of every matching file, like “rm -rf file1 file2 file3 file4″ and so on. There is a relatively small buffer of memory allocated to storing this list of arguments and if it is filled up, the shell will not execute the program.

To get around this problem, a lot of people will use the find command to find every file and pass them one-by-one to the “rm” command like this:

find . -type f -exec rm -v {} \;


The above command may take too long.

I stumbled upon a much faster way of deleting files – the “find” command has a “-delete” flag built right in! Here’s what I ended up using:

find . -type f -delete

Using this command file deleting rate may be reached at 2000 files/second – much faster!

You can also show the filenames as you’re deleting them:

find . -type d -print -delete

…or even show how many files will be deleted, then time how long it takes to delete them:

root@devel# ls -1 | wc -l && time find . -type f -delete

real 0m3.660s
user 0m0.036s
sys 0m0.552s

Thursday, September 6, 2012

bin\javaw.exe not found when trying to install Oracle 11g 32 bit in Windows 7

Nothing more to do...
Just follow this steps

1) install JRE-1.7.0

2) add these 2 lines at the file oraparam.ini

JRE_VERSION=1.7.0
JRE_LOCATION=C:\Program Files\Java\jre7

3) comments the line :
1) install JRE-1.7.0

2) add these 2 lines at the file oraparam.ini

JRE_VERSION=1.7.0
JRE_LOCATION=C:\Program Files\Java\jre7

3) comments the line : JRE_VERSION=1.4.2