Explore Cat Command in Linux
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
# cat File1 File2
It will show the content off file1 and file2 both
# cat > file
To create a new file.
# cat file1 > file2
It will copy the content of one file to another file.
# cat file1 >> file2
It will append the content of file1 and file2
# tac file
It will display content in reverse order
# cat -E “file”
It will Highlight the end of line by ‘$’