8, Linux commonly used commands - to view the contents of the file

cat file1 view the file forward from the first byte content
tac file1 view a file in reverse, starting from the last line
more file1 view the contents of a long file of
less file1 similar to 'more' command, but it allows for file in forward operation and reverse operation of the same
first two lines of a file view -2 file1 head
tail -2 file1 view last two lines of a file
tail -f / var / log / messages in real time to see the contents of a file is added to the

Guess you like

Origin www.cnblogs.com/zengfh/p/12286540.html