Pages

Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Thursday, September 19, 2013

Nice Grep tool for Windows - grepWin

Hi!

I've found a great tool to do greps in Windows.




Please have a look at https://code.google.com/p/grepwin/

Thursday, August 15, 2013

Generate many files of a particular size in Windows



I was recently performing some performance testing that required me to copy many files of a particular size from one Windows XP workstation to a Windows 2003 server. I had a heck of a time figuring out how to batch generate the test files.


Finally I cam across the fsutil tool, which is included on both Windows XP and Windows Server 2003.


The syntax for using fsutil is:


fsutil file createnew filename filesize


I used a simple loop to create files of a particular size using fsutil. Running from a command prompt:


For /L %i in (1,1,25000) do fsutil file createnew A%i.tmp 12288


will create 25,000 files of 12288 bytes (12KB) named A1.tmp, A2.tmp, A3,tmp…


to run this loop in a .cmd file instead of from the command line replace single % with double percent signs


For /L %i in (1,1,10000) do fsutil file createnew B%i.tmp 65536


will create 10,000 files of 65536 bytes (64KB) named B1.tmp, B2.tmp, B3,tmp…


For /L %i in (1,1,2500) do fsutil file createnew C%i.tmp 131072


will create 2,500 files of 131072 bytes (128KB) named C1.tmp, C2.tmp, C3,tmp…


For /L %i in (1,1,1000) do fsutil file createnew D%i.tmp 1048576


will create 1,000 files of 1048576 bytes (1024KB or 1MB) named D1.tmp, D2.tmp, D3,tmp…


I was able to create hundreds of thousands of files of a very specific size in a short amount of time using this procedure.


















For /L %i in (1,1,10000000) do fsutil file createnew %i.copy 15

Thursday, September 29, 2011

Oracle Express -=- Change default HTTP / FTP ports

Hi

If you want to change the default HTTP and FTP ports for the Oracle Administration Web Interface (APEX) you can do the following steps. You must type this in the Windows Command Manager:

C:\WINDOWS\system32>sqlplus system@xe

SQL*Plus: Release 10.1.0.2.0 - Production on Mi Jan 25 11:44:33 2006

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta

SQL> -- get current status
SQL> select dbms_xdb.gethttpport as "HTTP-Port"
, dbms_xdb.getftpport as "FTP-Port" from dual;

HTTP-Port FTP-Port
---------- ----------
8080 0

To change the ports, type the following command:

SQL> begin

2 dbms_xdb.sethttpport('8888');
3 dbms_xdb.setftpport('2121');
4 end;
5 /

PL/SQL procedure successfully completed.

SQL> select dbms_xdb.gethttpport as "HTTP-Port"
, dbms_xdb.getftpport as "FTP-Port" from dual;

HTTP-Port FTP-Port
---------- ----------
8888 2121


You can now access the web interface by typing http://localhost:8888 in the your browser.