Simple Linux Command line file text manipulation tips
posted by Michael Olafusi , on ,
This is going to be short and straight to the point.
Use cat file.txt to display the content of file.txt on the screen
Use cat file.txt | more to display the content of file.txt one page at a time
Use cat file.txt | less to enable scrolling. Press q to exit/end.
Use tac file.txt to display the content of file.txt in reverse
Use cat file1.txt > file2.txt to copy content of file1 to file2, file duplication.
Use cat file1.txt >> file2.txt to append content of file1 to file2.
Use tail -10 file.txt to display the last 10 lines in file.txtUse head -10 file.txt to display the first 10 lines in file.txt