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
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
Display file output with line no
cat -b file1 (-b do not count blank line)
print all file
cat *
cat *.txt
0 comments:
Post a Comment