Find all files recursively not containing a specified string in the file name
find . ! -name ‘*gz’ -type f This searches recursively in the current folder for all files that do not contain ‘gz’ in its name.
find . ! -name ‘*gz’ -type f This searches recursively in the current folder for all files that do not contain ‘gz’ in its name.
To search a folder recursively for files that contain a specific string using this grep -rnw -e ” . Note that this searches the file content. to search for string in file name use this find . ! -name ‘*gz’ -type f -delete
I went on a trip to Singapore recently and took around 500 photographs. I am not very good behind a camera, so i just got trigger happy and clicked whatever i could. After coming back i transferred the photographs to my laptop and started organizing them. I had some photos in my cell phone, some … Read more
If you have a site developed in J2EE and deployed on apache tomcat or glassfish, then implementing a wordpress blog on your site would be challenging since wordpress is all PHP. In this article we show how to install wordpress on a J2EE server. In the previous article we saw how to install Quercus on … Read more
In this article we look at how to run a php file in apache tomcat using Quercus. For those of you who have no clue why this article should exist, here is the complete story; Apache Tomcat is a J2EE application server, which means, it can run web applications that have been written in java … Read more
This article looks at how to merge shapefile polygons using Quantum GIS. you can download Quantum GIS from Here. We demonstrate the merging using an example. We have a France shapefile that shows all the regions in France. We want to merge all the regions and create a single shapefile for France. Here are the … Read more
Debugging PHP pages for a web application may be challenging. However, firePHP, a firefox extension can make debugging PHP pages very simple. Here are the steps to start debugging using firePHP. 1. Install firebug from https://getfirebug.com/downloads. 2. Install the firePHP extension from https://addons.mozilla.org/en-US/firefox/addon/firephp/. The browser is now ready to receive the PHP logs that are sent from … Read more
Opening up multiple cygwin windows or windows command prompt has annoyed almost every developer who had to do it. This post presents a way to open tabbed cygwin and windows command prompt using Console (http://sourceforge.net/projects/console/) . Here are the steps: Download console2 from http://sourceforge.net/projects/console/. Unzip it and launch console.exe. This should open up a window that … Read more
Many a times we use static methods or constants in our class. For example if you are writing a math library, there are chances that you would need to use lot of math functions from java.lang.Math. for example to calculate the nth power of x you would do y = Math.pow(x,3); pow is a static … Read more
It is useful to redirect standard java output to a file. However, if you are wondering why your stacktrace from e.printStackTrace() is not being redirected to a file then read on… Say you have a program called RedirectExample.java. To redirect the output to a text file do java RedirectExample > output.txt However, if your code in … Read more