Solved

A question on tar using -C

Posted on 2004-08-13
3
180 Views
Last Modified: 2010-04-20
What does this do "tar c -C /usr include -C /etc ."
I am not able to execute that successfully.
It will tar files from /usr/include and /etc and put it in the current directory?

0
Comment
Question by:gopikrish
3 Comments
 
LVL 20

Accepted Solution

by:
Gns earned 20 total points
ID: 11791296
It'll create a tar archive at the default tape device (see below) by first changing directory to /usr, getting all files from includ and downward, then change directory to /etc and getting everything from the current directory ... (which happen to be /etc).

Your error is likely that the default device /dev/rmt0 is non-existant on your system;-).
Now, this default device is actually decided during compilation (at least for GNU tar), so ... since most systems _don't_ have an rmt0 device, many distrios have this set to something else... You can see what by looking at the defenition of ARCHIVE in the output from
tar --help
... might default to "-f- -b20" whcih basically would just spew the complete archive onto stanrad output (ie the screen).
Remedy would be to use the -f flag to specify a file/location for the archive.

-- Glenn
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Apache application gives "Forbidden" message 5 55
Centos 7 User to Start Apache, MariaDB, LDAP 5 38
AD LDAP LDS 3 65
video edge NVR Device Discovery Problem 4 45
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question