Displaying keyword search results 21 - 27
Created by Dr. Xi on June 06, 2009 20:05:49 Last update: June 06, 2009 20:06:32
Use os.listdir to list the contents of a directory:
import os # list the contents of mydir. Cur...
Created by Dr. Xi on September 26, 2008 16:08:21 Last update: September 26, 2008 16:08:21
To list files containing the word limit in the current directory:
grep -l limit *However, the wild card * does not expand to include hidden files. To include hidden files, use:
ls -a | xargs grep -l limit
Created by Dr. Xi on September 25, 2008 23:49:56 Last update: September 25, 2008 23:50:39
grep BLOCK LIST Evaluates the BLOCK or EXPR...Find value in array:
$match_count = grep $_ eq $value, @array; @matc...
Created by Dr. Xi on September 25, 2008 23:43:35 Last update: September 25, 2008 23:43:54
@INC is a list of directories Perl uses to find modules to load. You can add directories to @INC by use lib... , or set the PERLLIB environment variable:
# using default @INC use Net::Socket::NonBl...
Created by Dr. Xi on September 22, 2008 01:22:23 Last update: September 22, 2008 16:20:01
On the Programs tab of Internet Options IE provides a list of HTML Editors to choose from. Choosing a program from the list will not change the View Source editor. It only changes the Edit with... command from the File menu. You need to modify the registry to add your favorite editor to the HTML Editors list. Add the keys listed below to the registry, or edit the registry keys in an editor and import back into the registry:
Windows Registry Editor Version 5.00 [HKEY_...Google " Internet Explorer Client Registry Layout " to find official information from MS.
Created by Dr. Xi on August 15, 2007 18:08:34 Last update: November 08, 2007 22:00:01
I had this problem when deploying a J2EE application into Oracle app server. It worked fine with an OC4J container configured in the default group. But it failed to start with an OC4J container I created. Here's a sample stack trace of the initialization exception:
07/08/14 13:32:46.34 10.1.3.3.0 Started 07/08/1...The problem was, the struts ActionServlet loads commons logging LogFactory, the log factory somehow knows that it needs log4j, but it can't load log4j since it's loaded by a different class loader. The solution for Oracle is to omit commons logging from the list of inherited libraries. Add this to META-INF/orion-application.xml solves the problem:
<imported-shared-libraries> <remove-inhe...Actually, this is a quite common problem with commons-logging. If you search the web, you'll find that people have...
Created by Dr. Xi on August 29, 2007 03:50:17 Last update: August 29, 2007 03:53:02
The command lsof lists all open files. Here are some simple uses: 1. List what files are in use by process with id 2512:
/usr/sbin/lsof -p 25122. To find the process that has /u/abe/foo open, use:
lsof /u/abe/foo3. To find who's accessing the CDROM:
$ /usr/sbin/lsof /media/cdrom COMMAND PID ...4. To list all files using any protocol on port 80:
lsof -i :80This is a link to the man page: http://www.netadmintools.com/html/lsof.man.html