UNIX Commands
To Create a File:
Syntax: $ cat [option] > <filename>
Ex: $ cat > file1
Hello..
This is my first File
Have a Nice Day
Bye
Ctrl+d (Save)
Ctrl+d \u2013 Possible Completer
Ctrl+c \u2013 Cancel foreground Job
Ctrl+z \u2013 Stop (interrupted) a foreground Job
To View a already existing File:
Syntax: $ cat <filename>
Ex: $ cat file1
To append data to an existing file
Syntax: $ cat >> <filename>
Ex: $ cat >> file1
To Create a Multiple file with help of cat command
Syntax: $ cat <filename1 filename2 ...filename (n) >
Ex: $ cat >f1 >f2 >f3 >f4
Hello....
This is file number f4
We create multiple files
^d (Save)
Display the record number to the particular file
Syntax: $ cat [option] <filename>
Ex: $ cat -n file1
To ignore the blank Records
Syntax: $ cat [option] <filename>
Ex: $ cat -b file1
Vijay Kumar E R \u2013 98486 11007
1
Leave a Comment