47 Comments The cat short for “concatenate



Download 99.6 Kb.
View original pdf
Page2/5
Date23.11.2021
Size99.6 Kb.
1   2   3   4   5
1. Display Contents of File
The below example will show the contents of /etc/passwd �le.
# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin narad:x:500:500::/home/narad:/bin/bash
2. View Contents of Multiple Files in terminal
In below example, it will display the contents of the test and test1 �le in the terminal.
# cat test test1
Hello everybody
Hi world,
3. Create a File with Cat Command
We will create ale called test2 �le with the below command.
# cat >test2

13 Basic Cat Command Examples in Linux Terminal https://www.tecmint.com/13-basic-cat-command-examp...
2 of 19 18/11/21, 13:40

Awaits input from the user, type desired text, and press CTRL+D (hold down Ctrl

Download 99.6 Kb.

Share with your friends:
1   2   3   4   5




The database is protected by copyright ©ininet.org 2020
send message

    Main page