Contact us |
Using cat
To use cat to create a file1. Change directory to the /root/folder1 directory 2. Create a new text file called “first.txt” [root@localhost folder1]# cat > first.txt 3. Type in the phrase below at the blank prompt and press <ENTER>. This is a line from first.txt !! 4. Press the control key simultaneously with the “c” key on the keyboard. 5. Type “cat first.txt” to read the text you just typed in, [root@localhost folder1]# cat first.txt This is a line from first.txt !! 6. Create another file called “second.txt” using cat. Type the following text into the file – “This is a line from second.txt !!” What is the command to do this? To use cat to concatenate files together1. You will concatenate the files “first.txt” and “second.txt”. Type: [root@localhost folder1]# cat first.txt second.txt What is your output?
|
Login... |
||||