Say you have a txt file, what is the command to view the top 10 lines and bottom 10 lines of file simultaneously?
i.e. if the file is 200 lines long, then view lines
I would say that depending upon the size of the file, actively reading in its contents may not be desirable. In that circumstance, I think some simple shell scripting should suffice.
Here's how I recently handled this for a number of very large CSV files that I was analyzing:
$ for file in *.csv; do echo "### ${file}" && head ${file} && echo ... && tail ${file} && echo; done
This prints out the first 10 lines and the last 10 lines of each file, while also printing out the filename and some ellipsis before and after.
For a single large file, you could simply run the following for the same effect:
$ head somefile.csv && echo ... && tail somefile.csv