The tail command is used to display the last part of a file. By default, it shows the last 10 lines of the specified file. Here are some common usages:
Basic usage:
tail filename.txtDisplay a specific number of lines: To show the last 20 lines:
tail -n 20 filename.txtFollow a file in real-time: To continuously monitor a file for new lines (useful for log files):
tail -f filename.txtCombine options: You can combine options, for example, to show the last 5 lines and follow the file:
tail -n 5 -f filename.txt
Feel free to ask if you need more specific examples or explanations!
