Sponsored Content
Operating Systems Solaris Command to remove existing files in the tar files in Solaris 10 Post 302766047 by muraliinfy04 on Monday 4th of February 2013 06:13:09 AM
Old 02-04-2013
Command to remove existing files in the tar files in Solaris 10

Hi,
I am using solaris 10 OS.Please help me out with the commands needed in below two scenarios.

1)How to delete the existing files in the tar file.

suppose i have a main tarfile named application.tar and it contains a file called ingres.tar.
what is the command to remove ingres.tar from the main application.tar file

2)What is the command to see specific files in the tar file.

suppose i have tar file named application.tar which contains solarisstudio.tar.i have used
Code:
tar -tvf tarfile name

.but my main tar file application.tar contains so many files.so i am not able to figure out whethere a specific file exists or not.

Appreciate your response on it.

---------- Post updated at 06:13 AM ---------- Previous update was at 05:11 AM ----------

Any response on the above mentioned query?

Last edited by Scrutinizer; 02-04-2013 at 06:21 AM.. Reason: removed icode tags added code tags and icode tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

delete a file from an existing Solaris tar

How can I delete a file from an existing Solaris tar file ? (not gtar) (2 Replies)
Discussion started by: avnerht
2 Replies

2. UNIX for Dummies Questions & Answers

using tar command to copy files?

hi, can i use the tar command to copy an entire directory and its content in another folder? What is the proper syntax? thx (2 Replies)
Discussion started by: tomapam
2 Replies

3. Shell Programming and Scripting

Modifying command for Tar.gz Files.

:) Hi, I use the following command to search for a string in all the files in the directories and sub directories. find . -type f -print | xargs grep bermun@cial.net Can someone please cite a method wherin I can find the entries from a list of 300-500 *.gz files by modifying the above... (2 Replies)
Discussion started by: openspark
2 Replies

4. UNIX for Dummies Questions & Answers

how to add files to an existing tar file - HP-UNIX

Hello, What is the command to add files to an existing tar file. Thanks, (5 Replies)
Discussion started by: Nomaad
5 Replies

5. Shell Programming and Scripting

How to tar, compress and remove files older than two days

Hi, I'm Eddy from Belgium and I've the following problem. I try to write a ksh script in AIX to tar, compress and remove the original *.wav files from the directory belgacom_sf_messages older than two days with the following commands. The problem is that I do not find a good combination... (4 Replies)
Discussion started by: edr
4 Replies

6. UNIX for Dummies Questions & Answers

Count number of files in directory excluding existing files

Hi, Please let me know how to find out number of files in a directory excluding existing files..The existing file format will be unknown..each time.. Thanks (3 Replies)
Discussion started by: ammu
3 Replies

7. 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

8. Shell Programming and Scripting

Append files to a existing tar file.

Hi all, I want to check whether tar file exists in the directory or not. If tar file exists in the directory then I want to append the files to it. I am using the below command to tar files if the file does not exist. tar zcvf <tar file name> <Files to append> However, if want to... (4 Replies)
Discussion started by: Nagaraja Akkiva
4 Replies

9. UNIX for Dummies Questions & Answers

How to tar files of different extensions in one command

Linux RHEL 5.4 It is easy to create a tarball when you have files same extension For eg: You want to tar all files with the extension .log . This is easy tar -cvf diagnose.tar *.log I have two files with different extensions .log and .sh : error.log myscript.sh I want to create a... (5 Replies)
Discussion started by: John K
5 Replies

10. UNIX for Dummies Questions & Answers

Remove files from tar archive which are more than 1000 days old.

I am not able to extract/remove files older than 1000 days from a tar archive in linux system. #!/usr/bin/perl @file_list = `find /home/x/tmp/ -name *xxMsg* -ctime +7`; $file_name = '/home/x/tmp/new_archive.tar'; for... (1 Reply)
Discussion started by: DannyV
1 Replies
virt-tar-in(1)						      Virtualization Support						    virt-tar-in(1)

NAME
virt-tar-in - Unpack a tarball into a virtual machine disk image. SYNOPSIS
virt-tar-in -a disk.img data.tar /destination virt-tar-in -d domain data.tar /destination zcat data.tar.gz | virt-tar-in -d domain - /destination WARNING
Using "virt-tar-in" on live virtual machines can be dangerous, potentially causing disk corruption. The virtual machine must be shut down before you use this command. DESCRIPTION
"virt-tar-in" unpacks an uncompressed tarball into a virtual machine disk image or named libvirt domain. The first parameter is the tar file. Use "-" to read the tar file from standard input. The second parameter is the absolute target directory to unpack into. EXAMPLES
Upload a home directory to a guest: virt-tar-in -d MyGuest homes.tar /home JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH
This command is just a simple shell script wrapper around the guestfish(1) "tar-in" command. For anything more complex than a trivial copy, you are probably better off using guestfish directly. OPTIONS
Since the shell script just passes options straight to guestfish, read guestfish(1) to see the full list of options. SEE ALSO
guestfish(1), virt-cat(1), virt-copy-in(1), virt-copy-out(1), virt-edit(1), virt-make-fs(1), virt-tar-out(1), <http://libguestfs.org/>. AUTHORS
Richard W.M. Jones ("rjones at redhat dot com") COPYRIGHT
Copyright (C) 2011 Red Hat Inc. <http://libguestfs.org/> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. libguestfs-1.18.1 2013-12-07 virt-tar-in(1)
All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy