Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Sunday, August 25, 2013

Tratando archivos de texto gigantes en linux.

INTRODUCCIÓN

Al tratar con archivos de texto gigantes (recientemente en mi experiencia un dump SQL de ~37GB) surgen complicaciones: espacio en disco, lentitud, memoria, etc.
A continuación se presentan 3 técnicas ensayadas para tratar de solventar el problema.




INICIO

Invocación de script para generar "huge file":
$ ./build_huge_02.sh 1000000 > myhugefile.txt

Friday, July 30, 2010

OverWrite. A program to inject random lines between original lines of a file.

//OverWrite21.c
//A program to inject random lines between original lines of a file.
//30-JUL-2010



//include headers and libraries
#include
#include
#include
#include

#include
#include

#include


//define constants and macros
#define BUFFERSIZE 1024


//declare functions prototypes
void DisplayError(LPTSTR lpszFunction);
int fReadTheFile(LPCTSTR, char[]);
void fWriteTheFile(LPCTSTR, char[]);
void fCloseFile(HANDLE);


//
// Note: this simplified sample assumes the file to read is an ANSI text file
// only for the purposes of output to the screen. CreateFile and ReadFile
// do not use parameters to differentiate between text and binary file types.
//