Tuesday, November 8, 2022

tac command in Linux with Examples

                                             Tac Command

    tac command in Linux is used to print files in reverse. When no file is specified then this command will read the standard input.

 Example for tac command

1. Create a file by using cat command.

[root@localhost ~]# cat > file1
welcome to linux
Thanks for visiting our channel

2. Check the file the data is available are not.

[root@localhost ~]# cat file1
welcome to linux
Thanks for visiting our channel

3. tac command will print the output in reverse.

[root@localhost ~]# tac file1
Thanks for visiting our channel
welcome to linux 

     

    You can use this tac command in all Linux flavors like redhat, ubuntu, kali linux, linux mint, debian, manjaro, arch linux, opensuse, centos, etc.

Wednesday, November 2, 2022

Cat Command in Linux / Unix

                                 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

Docker Crash Course for DevOps Engineers

  Introduction to Docker:                Containerization is a lightweight method of running applications in isolated environments using sha...