I\'m looking for a way to limit the amount of output produced by all command line programs in Linux, and preferably tell me when it is limited.
I\'m working over a s
I don't know about the general case, but for each well-known command (cat, ls, find?) you could do the following:
So along these lines (utterly untested):
$ ln `which cat` ~/bin/old_cat
function trunc_cat () {
`old_cat $@ | head -n 100`
}
alias cat=trunc_cat