Simple Linux Command line file text manipulation tips

, , No Comments
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.txt
Use head -10 file.txt to display the first 10 lines in file.txt


Post a Comment

You can be sure of a response, a very relevant one too!

Click on Subscribe by Email just down below the comment box so you'll be notified of my response.