cat command in linux

cat command: This is the most basic command in linux is use to create a file, view the content of file.

Create file using cat command
cat > file1

Press Ctrl+d to save file

Append new value in file
cat >>file1

View file output
cat file1

Redirect output of file in another file
cat file1 >file2

display file output with line no 
cat -n file1

Display file output with line no
cat -b file1  (-b do not count blank line)

print all file
cat *
cat *.txt

Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment