Hi.. when I do a ls -lt, I get a listing of about 200 files.. These are trace files and some of it I might not need..
To be clear, say in a given week , I might not need files that have been traced between 11 and 11:30 am on a particular day. How can I delete based on this condition ?
Thanks,... (4 Replies)
Guys help me out here....
I have the following var: date_system=20080507
And I have a folder with many files with the following pattern:
test_%date%_reference, like
test_20080201_tokyo.csv
test_20080306_ny.csv
and so on...
What I need is:
1) list all files and them compare the... (1 Reply)
Hi everyone,
I have some large text files that I need to split into a specific number of files of equal size. As far as I know (and I don't really know that much :)) the split command only lets you specify the number of lines or bytes. The files are all of a different size, so the number of... (4 Replies)
I have two files of the type
111 222 10
112 223 20
113 224 30
114 225 20
and
111 222 9
444 555 8
113 224 32
666 777 25
I want to merge files based on 1 and 2nd column. if 1st and 2nd column are unique in file 1 and 2 keep... (3 Replies)
I have two files as below
A file
/* comment for id1 */
"id1" = "x1"
/* comment for id2 */
"id2" = "x2"
/* comment for id3 */
"id3" = "x3"
B file
/* comment for id1 */
"id1" = "y1"
/* comment for id2 */
"id2" = "x2" (22 Replies)
Hi ,
I have 100 records in a.txt file
Need to split the a.txt file in to 5 files
1ST File:
ex: My file name should be a1.txt - line count in file should be 1 to 15
2ND File:
ex: My file name should be a2.txt - line count in file should be 16 to 40
3ND File:
ex: My file name... (1 Reply)
Hello,
I need to split a file by number of records and rename each split file with actual filename pre-pended with 3 digit split number.
What I have tried is the below command with 2 digit numeric value
split -l 3 -d abc.txt F (# Will Produce split Files as F00 F01 F02)
How to produce... (19 Replies)
Hello there.
I am trying to compare two files.
File1
Austria Mobile 1
United Kingdom Mobile 1
...
File2
Austria Mobile Vien 2
Austria Mobile Ostr 0
United Kingdom Mobile Dev 0.7
United Kingdom Mobile OST 1.5
What i want to do is to compare both files and... (12 Replies)
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
LEARN ABOUT CENTOS
getdelim
GETLINE(3) Linux Programmer's Manual GETLINE(3)NAME
getline, getdelim - delimited string input
SYNOPSIS
#include <stdio.h>
ssize_t getline(char **lineptr, size_t *n, FILE *stream);
ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getline(), getdelim():
Since glibc 2.10:
_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700
Before glibc 2.10:
_GNU_SOURCE
DESCRIPTION
getline() reads an entire line from stream, storing the address of the buffer containing the text into *lineptr. The buffer is null-termi-
nated and includes the newline character, if one was found.
If *lineptr is NULL, then getline() will allocate a buffer for storing the line, which should be freed by the user program. (In this case,
the value in *n is ignored.)
Alternatively, before calling getline(), *lineptr can contain a pointer to a malloc(3)-allocated buffer *n bytes in size. If the buffer is
not large enough to hold the line, getline() resizes it with realloc(3), updating *lineptr and *n as necessary.
In either case, on a successful call, *lineptr and *n will be updated to reflect the buffer address and allocated size respectively.
getdelim() works like getline(), except that a line delimiter other than newline can be specified as the delimiter argument. As with get-
line(), a delimiter character is not added if one was not present in the input before end of file was reached.
RETURN VALUE
On success, getline() and getdelim() return the number of characters read, including the delimiter character, but not including the termi-
nating null byte ('