09-07-2017
Quote:
Originally Posted by
Peu Mukherjee
Thank you all for your response
The below command has really helped in reducing the time. Would this also sort the rows or do we need to use sort after this?
It reduced time by not sorting it. That's liable to be what took the lion's share of the time.
If you need it sorted, and need it sorted faster, point
sort to a different disk for temporary space with -T /path/to/folder. Using a different disk for temp space will increase the speed your data can be read.
GNU sort also has a --parallel option, but this is not much help unless you have extraordinarily fast disks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
One of our servers runs Solaris 8 and does not have "ls -lh" as a valid command. I wrote the following script to make the ls output easier to read and emulate "ls -lh" functionality. The script works, but it is slow when executed on a directory that contains a large number of files. Can anyone make... (10 Replies)
Discussion started by: shew01
10 Replies
2. Shell Programming and Scripting
hii everyone ,
i have a file in which i have line numbers.. file name is file1.txt
aa bb cc "12" qw
xx yy zz "23" we
bb qw we "123249" jh
here 12,23,123249. is the line number
now according to this line numbers we have to print lines from other file named... (11 Replies)
Discussion started by: kumar_amit
11 Replies
3. Red Hat
Hi,
Can any one help me out in solving the problem i have a linux database server it is tooo slow that i am unable to open even the terminial is there any solution to get rid of this problem.How to make this server faster.
Thanks & Regards
Venky (0 Replies)
Discussion started by: venky_vemuri
0 Replies
4. Shell Programming and Scripting
Hi All,
I have some 80,000 files in a directory which I need to rename. Below is the command which I am currently running and it seems, it is taking fore ever to run this command. This command seems too slow. Is there any way to speed up the command. I have have GNU Parallel installed on my... (6 Replies)
Discussion started by: shoaibjameel123
6 Replies
5. Shell Programming and Scripting
Hi all,
In bash scripting, I use to read files:
cat $file | while read line; do
...
doneHowever, it's a very slow way to read file line by line.
E.g. In a file that has 3 columns, and less than 400 rows, like this:
I run next script:
cat $line | while read line; do ## Reads each... (10 Replies)
Discussion started by: AlbertGM
10 Replies
6. Shell Programming and Scripting
Hi,
I have a script below for extracting xml from a file.
for i in *.txt
do
echo $i
awk '/<.*/ , /.*<\/.*>/' "$i" | tr -d '\n'
echo -ne '\n'
done
.
I read about using multi threading to speed up the script.
I do not know much about it but read it on this forum.
Is it a... (21 Replies)
Discussion started by: chetan.c
21 Replies
7. Shell Programming and Scripting
awk "/May 23, 2012 /,0" /var/tmp/datafile
the above command pulls out information in the datafile. the information it pulls is from the date specified to the end of the file.
now, how can i make this faster if the datafile is huge? even if it wasn't huge, i feel there's a better/faster way to... (8 Replies)
Discussion started by: SkySmart
8 Replies
8. Shell Programming and Scripting
Hi,
I have a large number of input files with two columns of numbers.
For example:
83 1453
99 3255
99 8482
99 7372
83 175
I only wish to retain lines where the numbers fullfil two requirements. E.g:
=83
1000<=<=2000
To do this I use the following... (10 Replies)
Discussion started by: s052866
10 Replies
9. Shell Programming and Scripting
I have script like below, who is picking number from one file and and searching in another file, and printing output.
Bu is is very slow to be run on huge file.can we modify it with awk
#! /bin/ksh
while read line1
do
echo "$line1"
a=`echo $line1`
if
then
echo "$num"
cat file1|nawk... (6 Replies)
Discussion started by: mirwasim
6 Replies
10. Shell Programming and Scripting
I have nginx web server logs with all requests that were made and I'm filtering them by date and time.
Each line has the following structure:
127.0.0.1 - xyz.com GET 123.ts HTTP/1.1 (200) 0.000 s 3182 CoreMedia/1.0.0.15F79 (iPhone; U; CPU OS 11_4 like Mac OS X; pt_br)
These text files are... (21 Replies)
Discussion started by: brenoasrm
21 Replies
LEARN ABOUT MINIX
readahead
readahead(8) System Manager's Manual readahead(8)
NAME
readahead - file preloader for boot process optimization
SYNOPSIS
readahead [options] <file-list> [another-file-list [...]]
DESCRIPTION
readahead is a files preloader designed to optimize the disk I/O during the boot process.
OPTIONS
-b, --build
build optimised files list only, without sorting.
-s, --sort
build and sort list of files only (implies -b).
-o, --output <file>
write sorted list of files to file.
-d, --dont-sort
preload files described by an already sorted files list.
-h, --help
print the usage information.
-v, --verbose
enable the verbose mode.
-t, --timing
report time spent on each operation.
-m, --maxsize <max size>
maximum size in KiB a file can be in order to be preloaded, default is 10240.
<file-list> [another-file-list [...]]
One or more files containing the list of files to be preloaded or sorted. The files list can be generated by readahead-collector(8).
FILES
/etc/default/readahead-fedora
SEE ALSO
readahead-collector(8), readahead(2),
AUTHORS
Arjan van de Ven <arjan@infradead.org>,
Ziga Mahkovec <ziga.mahkovec@klika.si>, Karel Zak <kzak@redhat.com>,
This manual page was written by Raphael Geissert <geissert@debian.org>
July 2011 readahead(8)