Working with Your Data in Unix

I came across a long list of useful UNIX commands put together by Seth Brown. You'll appreciate many and remember a few.

By Matthew Malinowski, 2012-12-03

Check this out: Seth Brown with some seriously useful Unix commands to inspect your data.

A simple one that you've got some variation on already, probably:

(head -5; tail -5) < datafile

That returns the first five and last five lines of datafile.

Or, for inspecting multiple files:

head -3 file* | cat

This prints the first three lines of everything starting with file, but prints the name of each file before the lines. Awesome.

More here.

Back to Blog Index...