Linux: Show File Content
Show file content
print file content to screen.
cat fname | more
show file content by one screenful page at a time.
This is called “paging”.
Type q to exit. Type h for other keys.
Show first few lines or last few lines of a file
View the first few lines of a file. (most useful for big files, e.g. Log file.)
View the last few lines of a file.
tail -f fname
View the last few lines of a growing file, updated continuously. Typically used on log files. Ctrl+c to exit.
Show file type
print what type of file it is. (For example, text, jpg, png, pdf, etc.)
edit a file
edit a file. Type Escape : q to exit. [see vim Basics]
Linux Shell Basics
Directory and Files
Compress, Archive, Download
User, Group, File Perm
Process, Job Control