Sponsored Content
Top Forums UNIX for Advanced & Expert Users Move files while making a tar Post 302646201 by alpboys on Thursday 24th of May 2012 05:19:04 PM
Old 05-24-2012
Move files while making a tar

I have the following folder structure

code/f1/
code/lib/t1
code/lib/t2
code/lib/t3
code/lib/t3
code/lib_1/t1
code/exc

I would like to create a tar with a folder structure below and I can use the following tar command
f1
lib/t1
lib/t2
lib/t3

tar -cvf code.tar -C code f1 lib --exclude exc lib_1

But in some cases I need to replace lib/t1 with lib_1/t1 and keep the folder structure lib/t1.
I would like to know Is there a way in tar command I can move/replace an existing file in a tar with a different file but keep the existing folder structure?
or Add a file to a tar with a specific folder path?
or Move files during tar?

Thanks for the help in advance!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Making files readonly with vi?

Hi, I'm new at this whole Unix thing, but definately learning (lots of fun)... and I was wondering - how do you make a file read-only with vi? I don't mean how do you load up vi in read-only mode, but how do you save a file (or flag a file, or whatever) in vi to read-only? How do you make it... (2 Replies)
Discussion started by: Flyguy
2 Replies

2. UNIX for Advanced & Expert Users

Untaring *.tar.tar files

Hi all, How to untar a file with .tar.tar extension. A utility that i downloaded from net had this extension. Thanks in advance, bubeshj. (6 Replies)
Discussion started by: bubeshj
6 Replies

3. UNIX for Advanced & Expert Users

How to create a Tar of multiple Files in Unix and FTP the tar to Windows.

Hi, On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files. a) /usr/users/oracle/bin b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies

4. UNIX for Dummies Questions & Answers

tar, zip multiple separate directories and move the results to another volume

TIA, I'm using FreeBSD 6 I have a series of Directories (A,B,C,...Z). Each directory has files and other directories within it. I want to compress the contents of each top directory into a single file so that I get an archive of each directory (for example, A.gzip) AND and want to move... (5 Replies)
Discussion started by: jccbin
5 Replies

5. UNIX for Dummies Questions & Answers

Making tar of a remote file system

Hello, I was asked by my boss to make a backup of one of our systems that is slated to be decommissioned. When I suggested if could tar the "/" directory he nodded and said that would do the trick, When I try and execute the command I get EOF error. I think it is because there is not enough... (2 Replies)
Discussion started by: mojoman
2 Replies

6. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

7. UNIX for Dummies Questions & Answers

Using tar to move directories

I have figured out how to create a tar file that holds all the files in a particular directory. The plan is to move the tar to a new system via FTP so that we can test the new system with our files and libraries. What I can't figure out is how to unzip the tar file; I keep getting messages that... (8 Replies)
Discussion started by: KathyB148
8 Replies

8. AIX

Making Tar of directory and tar file is going to be placed

Quick question, is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?) sample: /opt/freeware/bin/tar -cvf - /oracle | gzip > /oracle/backup.tgz will the tar file backup.tgz also include backup.tgz ? i tried... (5 Replies)
Discussion started by: filosophizer
5 Replies

9. AIX

Tar - pre-checking before making the Tar file

Coming from this thread, just wondering if there is an option to check if the Tar of the files/directory will be without any file-errors without actually making the tar. Scenario: Let's say you have a directory of 20GB, but you don't have the space to make Tar file at the moment, and you want... (14 Replies)
Discussion started by: filosophizer
14 Replies
ERR_load_strings(3)						      OpenSSL						       ERR_load_strings(3)

NAME
ERR_load_strings, ERR_PACK, ERR_get_next_error_library - load arbitrary error strings SYNOPSIS
#include <openssl/err.h> void ERR_load_strings(int lib, ERR_STRING_DATA str[]); int ERR_get_next_error_library(void); unsigned long ERR_PACK(int lib, int func, int reason); DESCRIPTION
ERR_load_strings() registers error strings for library number lib. str is an array of error string data: typedef struct ERR_string_data_st { unsigned long error; char *string; } ERR_STRING_DATA; The error code is generated from the library number and a function and reason code: error = ERR_PACK(lib, func, reason). ERR_PACK() is a macro. The last entry in the array is {0,0}. ERR_get_next_error_library() can be used to assign library numbers to user libraries at runtime. RETURN VALUE
ERR_load_strings() returns no value. ERR_PACK() return the error code. ERR_get_next_error_library() returns a new library number. SEE ALSO
err(3), ERR_load_strings(3) HISTORY
ERR_load_error_strings() and ERR_PACK() are available in all versions of SSLeay and OpenSSL. ERR_get_next_error_library() was added in SSLeay 0.9.0. 0.9.7d 2002-04-30 ERR_load_strings(3)
All times are GMT -4. The time now is 10:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy