With suitable example, explain CpiO and tar commands. 

1 Answer

Answer :

cpio: The cpio command is one of standard Unix backup utilities. It stands for "copy in/out." It is much less well known and more rarely used Unix utility in comparison with tar.


cpio works as a filter accepting standard input and writing to standard output. cpio allows you to copy files into and out of a cpio archive.

The input to cpio is the list of files. That means that results of ls or find command can be piped directly into cpio. You can specify a device or file to which cpio will send its output, rather than sending it to stdout.

Cpio uses two key options: -o (output) and –I (input) wither of which (but not both) must be there in the command line.


Examples:

To create a *.cpio file : We can create *.cpio files containing files and directory with the help of cpio command.

Syntax:

cpio -ov < name-list > archive 

Here -ov is used as -o create the new archive and -v list the files processed. 

image

image


tar: For creating a disk archive that contains a group of files or an entire directory structure, we need to use tar. The tar command was originally used to write files to a tape device for archiving. The tar program is used to create, modify, and access files archived in the tar format. "tar" stands for tape archive.


Syntax: tar function [options] object1 object2 ...


Example: tar -cvf test.tar test1 test2 

To create an archive, we need to specify the name of the archive (with –f), the copy or write operation (-c) and the filenames as arguments. The use of –v (verbose) option is to display the progress while tar works. The above command creates the file archive test.tar from the two uncompressed files test1 and test2. 


image

Related questions

Description : Which of the following commands is used to list contents of directories? A. ls B. lp C. dir D. tar E. None of the above

Last Answer : A. ls

Description : Describe working of diff and cmp file handling commands with example.

Last Answer : Diff command: diff stands for difference. This command is used to display the differences in the files by comparing the files line by line. it tells us which lines in one file have is to be changed to make the two files ... $ cat file1 abcd xyz $ cat file2 Abed wxy $_  

Description : Describe cat and rm file handling commands with example.

Last Answer : cat Command: Cat(concatenate) command is very frequently used in Linux. It reads data from the file and gives their content as output. It helps us to create, view, concatenate files. cat is ... and will delete all the files and sub-directories recursively of the parent directory. $ rm -r 

Description : Describe use of following commands with example: i) route ii) net stat

Last Answer : Route: Packets are transmitted from one computer to another. The route determines where the process starts and what computer system needs to send the packet for it to reach its destination. In ... or softwaredefined network interface) and network protocol statistics. Options of Netstat:

Description : The ALU of a computer responds to the commands coming from A) Primary memory B) Control section C) External memory D) Cache memory

Last Answer : Answer : B

Description : Which is an escape code language used to send commands to the printer for printing documents? A. Postscript B. PCL C. Both (A) and (B) D. None of the Above

Last Answer : B. PCL

Description : _________ is a group of commands for a CPU in machine language. A. Information Set B. Instruction Set C. Buffer D. None of the Above

Last Answer : B. Instruction Set

Description : The toolbar which contains short cuts to some of the most frequently used commands found under the FORMAT menu item is: a) Standard Toolbar b) Status Bar c) Formatting Toolbar d) None of These

Last Answer : c) Formatting Toolbar

Description : ________toolbar contains short cuts to some of the most frequently used commands from the menu bar: a) Formatting Toolbar b) Standard Toolbar c) Both of Above d) None of These

Last Answer : b) Standard Toolbar

Description : ______bar displays the heading for each drop down menu. Commands are grouped under each of these menu headings according to function: a) Title Bar b) Formatting Toolbar c) Menu bar d) None of These

Last Answer : c) Menu bar

Description : Which among the following is correct about WRAM: a) Makes it easier to allow blocks of memory to be addressed with just a few commands b) Makes it easier to allow windows of memory to be addressed with just a few commands. c) Both of Above d) None of These

Last Answer : c) Both of Above

Description : _______is the process of carrying commands: a) Storing b) Executing c) Fetching d) None of These

Last Answer : b) Executing

Description : ______toolbar contains short cuts to some of the most frequently used commands from the menu bar: a) Standard b) Title c) Status Bar d) None of These

Last Answer : a) Standard

Description : Which among the following print commands should be selected to print first 5 pages of document: a) Page Setup b) Print All c) From ___to ____ d) None of The Above

Last Answer : c) From ___to ____

Description : ________ is the process of carrying commands. a) Fetching b) Storing c) Executing d) Decoding e) None of these

Last Answer : c) Executing

Description : Which of the following commands is given to reboot the computer? 1) Ctrl + Alt + Del 2) Ctrl + Alt + Tab 3) Ctrl + Shift + Del 4) Ctrl + Alt + shift

Last Answer : 1) Ctrl + Alt + Del

Description : A ..... contains buttons and menus that provide quick access to commonly used commands. 1) Menu Bar 2) Toolbar 3) Window 4) Action Bar

Last Answer : 2) Toolbar

Description : The.... of software contains list lists of commands and options. 1) Menu bar 2) Title bar 3) Formula bar 4) Tool bar

Last Answer : 1) Menu bar

Description : Which file in MS-DOS contains internal commands that are loaded during Booting process? 1) IO.SYS 2) MSDOS.SYS 3) COMMAND.COM 4) CONFIG.SYS

Last Answer : 4) CONFIG.SYS

Description : Which type of commands in DOS needs additional files for their execution? 1) Internal Commands 2) External Commands 3) Batch Commands 4) Redirector

Last Answer : 2) External Commands

Description : Which of the following commands displays names of files in sorted order? 1) DIR/N 2) DIR/SO 3) DIR/AN 4) DIR/AH

Last Answer : 3) DIR/AN

Description : Which file in MS-DOS contains internal commands that are loaded during Booting process? 1 IO.SYS 2 MSDOS.SYS 3 COMMAND.COM 4 CONFIG.SYS

Last Answer : 4 CONFIG.SYS

Description : Which type of commands in DOS needs additional files for their execution? 1 Internal Commands 2 External Commands 3 Batch Commands 4 Redirectors

Last Answer : 2 External Commands

Description : Which of the following commands displays names of files in sorted order? 1 DIR/N 2 DIR/SO 3 DIR/AN 4 DIR/AH

Last Answer : 3 DIR/AN

Description : . Which attack is an HTTP attack which allows attackers to access restricted directories and execute commands outside the web servers root directory? a. XSS attack b. Path Traversal attack c. MITM attack d. SQL Injection attack

Last Answer : d. SQL Injection attack

Description : Write the output for the following commands: (i) ls –a (ii) date “+%D”

Last Answer : i) ls –a : list all files including hidden files. These are files that start with “.”. ii) date “+%D” : Display date as mm/dd/yy. output: 11/26/19

Description : Define internal and external commands.

Last Answer : Internal Commands: Commands which are built into the shell. For all the shell built-in commands, execution of the same is fast in the sense that the shell doesn't have to search the given path for them in ... usually is at /usr/bin, the executable /usr/bin/cat gets executed. Examples: ls, cat etc. 

Description : Which of the following commands is called as three-finger salute in computers ? (1) Ctrl + Alt + Delete (2) Ctrl + Shift + Escape (3) Ctrl + Shift + Enter (4) Ctrl + Alt + Arrow key

Last Answer : Ctrl + Alt + Delete

Description : Describe working of RAID-0 and RAID-1 with suitable example.

Last Answer : RAID 0 (Striped Disk Array Without Fault Tolerance):  This level strips the data into multiple available drives equally giving a very high read and write performance but offering no fault tolerance or redundancy.  ... No. of Disk: 2 Size of each disk: 100GB Usable Disk size: 100GB

Description : Do speech commands, or speech to text apps help or hurt our actual speech abilities?

Last Answer : answer:My speech skills are impeccable. Siri loves me.

Description : Can you help me with some very basic puppy training commands?

Last Answer : You could either take her to a class near you such as the ones at Pet Smart or search google for some videos on training. I saw a few out there and one was from IAMS, one from Purina, and I'm ... system. Everytime she does something you want her to do, give her a treat and a loving pat on the head.

Description : Where can I learn all Terminal commands in Ubuntu?

Last Answer : answer:http://ss64.com/bash/ https://www.google.com/search?q=a-z+list+of+linux+commands

Description : Can you teach me the 'If' commands in Excel?

Last Answer : answer:You don't really need an IF function here. Let me introduce you to another one that's great for use with dates: DATEDIFF, which gives the difference between dates depending on the parameter ... contains this function, which is very simple. Send a follow-up message if you need that assistance.

Description : I put myself as a OP on a server for minecraft and none of the commands are working what do I do?

Last Answer : answer:Make sure you’re putting the / before your server commands, of course. Otherwise, try and restart the server. Some changes like enabling monsters take time and a few restarts occasionally.

Description : Is it possible to train arthropods to obey basic human voice commands?

Last Answer : answer:I would say (I'm not schooled in this field, but I do know some information) arthropods, over the years have developed different parts of their brains to adapt. Taste & smell are more important & ... answer I can provide based on what little I know. Sorry I don't know much about the subject.

Description : My laptop touchpad isn't registering my commands very well, why?

Last Answer : Is the surface of it clean?

Description : I need to start a screensaver with voice commands?

Last Answer : My MIL is available!

Description : You happen to have purchased a house from the future. It accepts all kinds of voice commands. What are some of your commands?

Last Answer : “Make Bacon”

Description : Does OpenOffice support all the standard SQL commands?

Last Answer : http://www.google.com/#hl=en&q=openoffice+sql+functions

Description : What commands can I use to monitor disk health in Linux?

Last Answer : well, somethings, whats distro are you running? how big is your HDD, speed, Sata or IDE? And when does it bottleneck? during a certain app, or the general system its self?

Description : Where can I find simple Unix commands for Mac's Terminal online?

Last Answer : answer:Here are some simply commands. But if you're trying to cancel an operation, your best bet might be to type top and return, and find the process that you want to kill. Take not if its PID, ... , type kill and then the PID. For example, kill 1234. Then hit return. This will kill your process.

Description : Mail commands in terminal?

Last Answer : end?

Description : 8. Suppose you had the power to inscribe your orders, what four commands would you like to issue? -History

Last Answer : I would like to issue the following four orders: Everyone should respect the elders and elders should love their youngers. Everyone should respect the other's religion. One should try to understand ... religion and respect it. Be kind to your servants and employees. Be loyal to your motherland.

Description : What are the commands contained by Create tab? -Technology

Last Answer : The Create tab has various commands such as Table Design, Table Templates, Pivotchart, Form, Report, Macro and Query Wizard.

Description : What is table? Name the basic commands for creating a table. -Technology

Last Answer : Tables are made up of rows and columns. In HTML, tables are used to display tabular data in Web pages.The basic commands for creating tables are as follows:Table tags Row tags Cell tags andCaption tags .

Description : Rishi, a class XII student has given following commands for the given purposes: (i) To add a new column “Rating” : -Technology

Last Answer : No, above commands will not be able to achieve desired task as update and alter commands have been interchanged.In order to achieve desired result, following corrections should be incorporated in the previously used ... give an increase of 50 Rs. to all the books:Update library set price=price+50;

Description : With reference to the above given tables, write commands in SQL for (i) and (ii) and output for (iii) below: -Technology

Last Answer : (i) select TName, Passenger from Train T, Reservation R where T.TrainId=R.TrainId;(ii) select T.* from Train T, Reservation R where T.TrainId!=R.TrainId;(iii)TrainIdTNameSourceDestination3424Lucknow MailLucknowNew Delhi5400Century ExpressNew DelhiKanpur

Description : Write the commands to do the following operations on the dataframes given above : (i) To add dataframes df1 and df2. -Technology

Last Answer : import numpy as npimport pandas as pddf1 = pd.DataFrame({'mark1':[30,40,15,40],'mark2':[20,45,30,70]});df2 = pd.DataFrame({'mark1':[10,20,20,50],'mark2':[15,25,30,30]});print(df1)print(df2)(i) ... , inplace=True) print(df1)(iv) df1.rename(index = {0: 'zero', 1:'one'}, inplace = True) print(df1)

Description : Consider the following table Furniture. Write SQL commands for the statements (i) to (viii) and write output for SQL queries (ix) and (x). -Technology

Last Answer : SQL commands for the given statements (i) to (viii) ;1. SELECT FCODE, NAME. PRICE FROM Furniture WHERE PRICE < 5000;2. SELECT NAME. PRICE FROM Furniture3.4. WHERE NAME LIKE %table% ;5. SELECT DISTINCT WCODE ... ;15.16. Output for SQL queries (ix) and (x)(ix)SUM(PRICE)6500(x)COUNT(DISTINCT PRICE)5

Description : Write SQL Query commands based on the following table: -Technology

Last Answer : This answer was deleted by our moderators...