Cat Command
Cat means "concatenate files and print on the standard output"
- By using cat command you can create, read, append the data to the file.
You can use this cat command in all Linux flavors like redhat, ubuntu, kali linux, linux mint, debian, manjaro, arch linux, opensuse, centos, etc.
Some examples for cat command
1. Create a file by using cat command.
[root@localhost ~]# cat > file1
welcome to linux
Note: to save the file use Ctrl + d
2. Read a file by using cat command.
[root@localhost ~]# cat file1
welcome to linux
3. Append the data to a file by using cat command.
[root@localhost ~]# cat >> file1
Thanks for visiting our channel
4. Check the file the data is available are not.
[root@localhost ~]# cat file1
welcome to linux
Thanks for visiting our channel
No comments:
Post a Comment