Showing posts with label tricks and tools. Show all posts
Showing posts with label tricks and tools. Show all posts

Tuesday, June 8, 2010

Wait a second in batch - the ping hack

If you have to wait a couple of seconds in a batch script you can use the following trick:

PING -n 11 127.0.0.1 >NULL

This will make 11 pings and by chance this takes approximately 11 seconds. If you have a better system let me know.

Thursday, March 4, 2010

Kind of grep in your dos-prompt

Do you recognise the situation where you wish that you are on a windows box and grep would be handy to go logs and other text files. There is something called findstr, and it can handle regular expressions.

Tuesday, May 5, 2009

Quick format or regular format?

Yesterday I worked side by side with a collegue specialized in storage (SAN) and when he presented the disks to the Windows Operating System I mounted the drives and told Windows to start formating.

After a while my collegue asked me how far the formatting was and when I said X %, he told me I should have taken quick format to go quicker. Always willing to learn something I asked him what the actual difference is. The guy said that when you do a quick format, you actually don't do a format but the formatting will be done when you need the space. Quick format only defines the beginning and the end of the partition. Whereas the full format does a real format and goes through every sector on the partition. By doing this you will gain I/O performance my storage specialist said. This is interesting since one of the classic bottlenecks is the disk I/O.

So, OK it takes time to format 300GB but if I gain some I/O performance and in the best of cases I can do it at night while sleeping it is worth I think considering it.

Monday, November 24, 2008

Converting a disk from FAT32 to NTFS

Today I had to convert my external disk form FAT32 to NTFS. I was confronted with the problem that an ISO file was 9GB and FAT32 couldn't handle that.


Convert is a tool that is part of your Windows OS.


Here is the syntax to convert the disk:

>convert diskletter: /fs:NTFS [enter]


After starting the convert tool you'll have to enter the disk label and the conversion starts. First it checks the disk for errors and than the actual conversion starts.

Friday, October 31, 2008

A usefull trick used at our customers

Everybody in IT knows it CLI is your friend :)



A little trick used at our customers to get a CLI with sufficient rights is:

runas /user:username@domain /netonly cmd



This gives you your little box executed with the rights of that user in that domain.