07-19-2010
Hello Everyone...
Thanks for your responses!!!
I need to divide my huge data file into smaller files (of say 10 MB or so). I have to feed this file ( as smaller sub-files) into another program.
The line numbers in each file vary. The program cannot take a huge file together, and needs chunks of data!!
I hope I am a little more clear now??
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can you please help me with writing script for following purpose.
I have to divide single large web access log file into multiple log files based on dates inside the log file.
For example:
if data is logged in the access file for jan-10-08 , jan-11-08 , Jan-12-08
then make small log file... (1 Reply)
Discussion started by: kamleshm
1 Replies
2. UNIX for Dummies Questions & Answers
hi all
im new to this forum..excuse me if anythng wrong.
I have a file containing 600 MB data in that. when i do parse the data in perl program im getting out of memory error.
so iam planning to split the file into smaller files and process one by one.
can any one tell me what is the code... (1 Reply)
Discussion started by: vsnreddy
1 Replies
3. UNIX for Dummies Questions & Answers
I have a file with a simple list of ids. 750,000 rows. I have to break it down into multiple 50,000 row files to submit in a batch process.. Is there an easy script I could write to accomplish this task? (2 Replies)
Discussion started by: rtroscianecki
2 Replies
4. Shell Programming and Scripting
frnds:
i want to divide data on the behalf of dotted line and redirectd into new files
)
-------------------------
M-GET CONFIRMATION (
-------------------------
M-GET CONFIRMATION (
INVOKE IDENTIFIER
final data shuld be into 3 files ...... (6 Replies)
Discussion started by: dodasajan
6 Replies
5. Shell Programming and Scripting
hello!
i need a little help from you :) ... i need to split a file into separate files depending on two conditions using scripting. The file has no delimiters. The conditions are col 17 = "P" and col 81 = "*", this will go to one output file; col 17 = "R" and col 81 = " ". Here is an example.
... (3 Replies)
Discussion started by: chanclitas
3 Replies
6. Shell Programming and Scripting
I need to find some data in a large no. of files. The data is in the following format :
VALUE A VALUE B VALUE C VALUE D
10 4 65 1
12 4.5 65.5 2
10.75 5.1 ... (2 Replies)
Discussion started by: cooker97
2 Replies
7. Shell Programming and Scripting
Help needed urgently please.
I have a large file - a few hundred thousand lines.
Sample
CP START ACCOUNT
1234556
name 1
CP END ACCOUNT
CP START ACCOUNT
2224444
name 1
CP END ACCOUNT
CP START ACCOUNT
333344444
name 1
CP END ACCOUNT
I need to split this file each time "CP START... (7 Replies)
Discussion started by: frustrated1
7 Replies
8. Shell Programming and Scripting
Hi All,
I do have an EBCDIC file sent from the z/os , this file has records with different record types in it, the type of record is identified by bytes 45-46 like
value 12 has employee record
value 14 has salaray record and etc....
we do now want to split the big ebcdic file into multiple... (3 Replies)
Discussion started by: okkadu
3 Replies
9. Shell Programming and Scripting
I will simplify the explaination a bit, I need to parse through a 87m file -
I have a single text file in the form of :
<NAME>house........
SOMETEXT
SOMETEXT
SOMETEXT
.
.
.
.
</script>
MORETEXT
MORETEXT
.
.
. (6 Replies)
Discussion started by: sumguy
6 Replies
10. UNIX for Beginners Questions & Answers
Dears,
Need you help with the below file manipulation. I want to split the file into 8 smaller files but without cutting/disturbing the entries (meaning every small file should start with a entry and end with an empty line). It will be helpful if you can provide a one liner command for this... (12 Replies)
Discussion started by: Kamesh G
12 Replies
LEARN ABOUT LINUX
free_hugepages
ALLOC_HUGEPAGES(2) Linux Programmer's Manual ALLOC_HUGEPAGES(2)
NAME
alloc_hugepages, free_hugepages - allocate or free huge pages
SYNOPSIS
void *alloc_hugepages(int key, void *addr, size_t len,
int prot, int flag);
int free_hugepages(void *addr);
DESCRIPTION
The system calls alloc_hugepages() and free_hugepages() were introduced in Linux 2.5.36 and removed again in 2.5.54. They existed only on
i386 and ia64 (when built with CONFIG_HUGETLB_PAGE). In Linux 2.4.20 the syscall numbers exist, but the calls fail with the error ENOSYS.
On i386 the memory management hardware knows about ordinary pages (4 KiB) and huge pages (2 or 4 MiB). Similarly ia64 knows about huge
pages of several sizes. These system calls serve to map huge pages into the process's memory or to free them again. Huge pages are locked
into memory, and are not swapped.
The key argument is an identifier. When zero the pages are private, and not inherited by children. When positive the pages are shared
with other applications using the same key, and inherited by child processes.
The addr argument of free_hugepages() tells which page is being freed: it was the return value of a call to alloc_hugepages(). (The memory
is first actually freed when all users have released it.) The addr argument of alloc_hugepages() is a hint, that the kernel may or may not
follow. Addresses must be properly aligned.
The len argument is the length of the required segment. It must be a multiple of the huge page size.
The prot argument specifies the memory protection of the segment. It is one of PROT_READ, PROT_WRITE, PROT_EXEC.
The flag argument is ignored, unless key is positive. In that case, if flag is IPC_CREAT, then a new huge page segment is created when
none with the given key existed. If this flag is not set, then ENOENT is returned when no segment with the given key exists.
RETURN VALUE
On success, alloc_hugepages() returns the allocated virtual address, and free_hugepages() returns zero. On error, -1 is returned, and
errno is set appropriately.
ERRORS
ENOSYS The system call is not supported on this kernel.
FILES
/proc/sys/vm/nr_hugepages Number of configured hugetlb pages. This can be read and written.
/proc/meminfo Gives info on the number of configured hugetlb pages and on their size in the three variables HugePages_Total,
HugePages_Free, Hugepagesize.
CONFORMING TO
These calls are specific to Linux on Intel processors, and should not be used in programs intended to be portable.
NOTES
These system calls are gone; they existed only in Linux 2.5.36 through to 2.5.54. Now the hugetlbfs file system can be used instead. Mem-
ory backed by huge pages (if the CPU supports them) is obtained by using mmap(2) to map files in this virtual file system.
The maximal number of huge pages can be specified using the hugepages= boot parameter.
COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2007-05-31 ALLOC_HUGEPAGES(2)