cat, less, head, and tail
What this is. You constantly need to see what is in a file without opening an editor. Four commands cover it, and they differ mainly in how much they show you.
cat file dumps the whole thing at once.
less file opens a scrollable pager you leave by pressing q.
head file shows the first ten lines.
tail file shows the last ten.
Counting is often what you actually wanted. wc counts, and its flags decide what.
wc -l file counts lines.
wc -w file counts words.
wc -c file counts characters.
wc -l is one of the most used commands in daily work, because how many is a question you ask constantly.
Mark this lesson complete
Signed in, your progress follows you to every device.