Skip to content
Advertisement

Count lines in large files

I commonly work with text files of ~20 Gb size and I find myself counting the number of lines in a given file very often. The way I do it now it’s just cat fname | wc -l, and it takes very long. Is there any solution that’d be much faster? I work in a high performance cluster with Hadoop

PHP run linux “less” command via exec – binary file warning

I have to convert some PDF files to TXT. I end up with “less” command, because for example pdftotext has some problems with tables in PDF. The problem is that when I ran the command from exec function (or shell_exec/system), less just showing me information, that selected PDF is binary file and result file is just TXT with PDF data

Better bash script to create directory structure

I want to create folders with plain text with a structure like: I thought about using a base command like mkdir and found that post : Bash script that creates a directory structure, but it still needs to write structure like : So I would need to change the regex used in : What bash command could I use to

perl byte code generation with too many file.pl

How to make perl bytecode if sub is there in another file.pl so that I can get all perl script in to binary to give for usage but I am getting codedump warning. Here is the example how I have done! File: add.pl File: util.pl Then when I run: I get I also tried but it says Note: If both

Is there a way to improve performance of linux pipes?

I’m trying to pipe extremely high speed data from one application to another using 64-bit CentOS6. I have done the following benchmarks using dd to discover that the pipes are holding me back and not the algorithm in my program. My goal is to achieve somewhere around 1.5 GB/s. First, without pipes: Next, a pipe between two dd processes: Are

Maven Multiple platform dependent Packages

I have written an application in Java that can be used on both Linux and Windows. Currently by running mvn package, my maven build system will generate a .msi using WiX. Is there a way of creating two package ‘tasks’ so I can say either mvn package-windows ormvn package-linux` Answer If you want to package both versions (Linux and Windows),

Linux Kernel Memory Management Paging Levels

I’m reading through the book “Understanding Linux Kernel” by Bovet and Cesati. In the second chapter, under “Paging in Linux” the author mentions how Page Middle and Upper Directories are eliminated with 32 architectures not having PAE enabled. I’m having trouble following what the author means. They have been loose in their treatment and does not make a whole lot

Advertisement