Use of cat command

Creat a file:-
---------------
[root@localhost ~]# cat > abhishek    (abhishek is a file                                             name)
Note:- CTRL + Z is used for save it.

Show the content of a file:-
----------------------------
[root@localhost ~]# cat abhishek   
 
Show line number of a file:-
----------------------------                      
[root@localhost ~]# cat -n abhishek
   
Show the content of multiple file a file:-
------------------------------------------
[root@localhost ~]# cat abhishek abhishek-1   

Show the content of multiple file with line number:-
----------------------------------------------------
[root@localhost ~]# cat -n abhishek abhishek-1  
Note:- file must be created already.

Copy the content of abhishek file into abhishek-1 file:-
--------------------------------------------------------
[root@localhost ~]# cat abhishek > abhishek-1   
Note:- Existing matter of 2nd file has been removed.

Copy the content of abhishek file into abhishek-1 file:-
--------------------------------------------------------
[root@localhost ~]# cat abhishek >> abhishek-1   
Note:- Existing matter of 2nd file also available.

==========================================================
                        EXERCISE
                        --------
Task-1:- Creat a file into desktop of 2nd user's via root home directory location.
Task-2:- Copy the data of Cisco file into Wireless_Router's file via root home directory location.
Task-3:- Show the line number of multiple file of Cisco and Wireless_Router's via root home directory.
Task-4:- Creat two blank file via "cat" command in abhishek's user of Mobile directory. Mobile directory available in Down
         load directory of abhishek's user. The file name is hp.txt and dell.txt
Task-5:- Copy the data of Cisco's file into dell.txt file via root home directory location. But existing data of dell.txt 
         file also available on it. 

No comments:

Post a Comment

Computer Hardware_(A+) & Operating System with Networking

Microprocessor Motherboard About Operating System Create Bootable Pen Drive via Command Map Network Drive File Transfer Protocol in Windows ...