command is one of the most frequently used commands in Linux and other operating system

Explore Cat Command in Linux

What is Cat command

Cat (concatenate) command is very frequently used in Linux. It reads data from the file and gives their content as output. 

cat command allows us to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files

# cat File

 it will show content of given filename

Explore Cat Command in Linux

 

# cat File1 File2

It will show the content off file1 and file2 both

Explore Cat Command in Linux

# cat > file

To create a new file.

Explore Cat Command in Linux

# cat file1 > file2

It will copy the content of one file to another file.

Explore Cat Command in Linux

# cat file1 >> file2 

It will append the content of file1 and file2

Explore Cat Command in Linux

# tac file

It will display content in reverse order

Explore Cat Command in Linux

Explore Cat Command in Linux

# cat -E “file”

It will Highlight the end of line by ‘$’

 

About Author

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish
Open chat
Hello
Can we help you?