Tuesday, 30 October 2018

CAT Commands in Linux







Cat
Command 
Cat Command is used for following purposes:
1.      
Create File
2.      
Write File
3.      
Append File
4.      
Display File Content
5.      
Concatenate Files
How to create File Using Cat Command:
Ø  cmd:    cat > /home/SALMAN/Desktop/MyDoc My_file1
How to save data in file:
Ø  press ctrl+d to save and exit from the file
How to display data/content
Ø  cat /home/ SALMAN /Desktop/MyDoc/My_File1
Ø  [junaid@localhost MyDoc]$ cat
MyFile MyFile2
o   Multiple file data displays
How to append any file:
Ø  cat >> /home/ SALMAN /Desktop/MyDoc
My_file1
How to concat two files in a new:
Ø  cat  My_file1 My_file2
>> newFile (treminal in same directory)

Display Line Numbers in File Content:


Ø 
cat -n MyFile (Terminal and file  at same directory)





No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...