Mukesh Chauhan

Just another WordPress.com weblog

FSUTIL – Create a file of specified size

Windows utility “fsutil” can be used to create a file of certain size.

Fsutil file createnew

For example:

fsutil file createnew C:\file_100MB.dat 104857600
will create a 100MB file (104,857,600B = 100MB) named “file_100MB.dat” in C drive.

July 1, 2011 Posted by | Uncategorized | Leave a comment

Disable structure padding in C

Following is the way to disable structure padding using pragma in C.

#pragma pack(push, 1)
//Define your structure here
#pragma pack(pop)
//Structure padding is re enabled.

More information can be found at MSDN. GCC follows the same specifications.

July 1, 2011 Posted by | Uncategorized | Leave a comment

Watch out

Ever been in the situation where you want to run the command continuously without writing a shell script for it.

Watch is used to run a command to run at regular intervals. The basic syntax of the command is
Continue reading

July 1, 2011 Posted by | Uncategorized | Leave a comment