haotu : an open lab notebook

2011/07/25

Split Large Text Files in Ubuntu Command Line

Filed under: Uncategorized — S @ 11:32

This function can be good for read text files from an Illumina run if you just want to grab a portion of it.

Split the file in manipulate the files with a editor. After that you reassemble the files again.

split -b 53750k <your-file>

bytes

split -l 5000 <your-file>

lines

cat xa* > <your-file>

concatenates the files back together

SYNOPSIS
split [OPTION]… [INPUT [PREFIX]]

-a, –suffix-length=N
use suffixes of length N (default 2)

-b, –bytes=SIZE
put SIZE bytes per output file

-C, –line-bytes=SIZE
put at most SIZE bytes of lines per output file

-d, –numeric-suffixes
use numeric suffixes instead of alphabetic

-l, –lines=NUMBER
put NUMBER lines per output file

2011/07/04

See Location Bar as text that can be copied

Filed under: Ubuntu — S @ 08:55

Use Cntrl-l

Blog at WordPress.com.