Sponsored Content
Top Forums Shell Programming and Scripting Extract root basedir name from a *.tar.gz file Post 302556833 by forrie on Monday 19th of September 2011 06:59:21 PM
Old 09-19-2011
Alright...

tar ztvf:

drwxr-xr-x 0/0 0 2011-07-26 17:20:44 FMS_4_0_3_r4011/conf/_defaultRoot_/
drwxr-xr-x 0/0 0 2011-07-26 16:51:28 FMS_4_0_3_r4011/conf/_defaultRoot_/_defaultVHost_/
-rw-r--r-- 0/0 43801 2011-07-26 16:51:28 FMS_4_0_3_r4011/conf/Logger.xml
-rw-r--r-- 0/0 46191 2011-07-26 16:51:28 FMS_4_0_3_r4011/conf/Server.xml

I only want:

FMS_4_0_3_r4011

So whatever release it is, I need to grab that name as a variable for installation work. Their installation stuff is crappy.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

extract a sub directory form a tar file

anyone know if it is possable to extract a subdirectory in a tar file. IE tarfile contains parent dir -sub dir A -sub dir B I want to extract sub dir B. (2 Replies)
Discussion started by: Optimus_P
2 Replies

2. UNIX for Dummies Questions & Answers

cant extract files from a tar file

hi everyone i have a tar file which was in AIX box. its 300mb. i cant untar in windowsxp home. I just get an empty folder with no files when i extract. i dont get any bad header or any such error. i am using IZARC which is a freeware. Not sure if i should try winzip or winrar. any help (2 Replies)
Discussion started by: bryan
2 Replies

3. Shell Programming and Scripting

extract one file form .tar.gz without uncompressing .tar.gz file

hi all, kindly help me how to extract one file form .tar.gz without uncompressing .tar.gz file. thanks in advance bali (2 Replies)
Discussion started by: balireddy_77
2 Replies

4. UNIX for Dummies Questions & Answers

tar command help -- extract single file

Hi, I want to view/display the contents of one file in tar file. For example if the tar file is sam.tar.gz and one of the file inside is E1.txt, how do i view the contents of this E1.txt file. Olso if I want to extract the E1.txt file only from sam.tar.gz how can i do that. Thanks in... (7 Replies)
Discussion started by: icefish
7 Replies

5. UNIX for Advanced & Expert Users

How to extract a particular file in tar.Z format

Hi , I need to extarct only a particulay files from the tar.Z. ie i need to extract one.txt from test.tar.Z. The test.tar.Z may contain lot of file and folders. Please help me to extract particular file to some location. Regards, Kalai. (1 Reply)
Discussion started by: kalpeer
1 Replies

6. UNIX for Dummies Questions & Answers

After extract from tar, commands cannot see file?

Hi, Hi recently downloaded the source code from Advanced Programming in the Unix Envrionment 2e and extracted the source from its tar file. The extracted files have these characteristics: 1) They can can be seen in a directory listing and brought up for viewing in emacs; 2) They cannot be... (2 Replies)
Discussion started by: TheTaoOfPhil
2 Replies

7. UNIX for Dummies Questions & Answers

Do I need to extract the entire tar file to confirm the tar folder is fine?

I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it. Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem? tar tvf file1.tar ... (1 Reply)
Discussion started by: vivien_chu
1 Replies

8. Solaris

HOW TO extract.tar file to specific directory..?

Hi all, In Solaris howto extract tar file to specific folder. This is what we do in Linux, but how to do the same thing in Solaris ? -tar -xzvf /tmp/etc.tar.bz -C /tmp (Will extract in /tmp dir) 3.gzip COMPRESSION AND EXTRACTION -tar -czvf /tmp/etc.tar.bz /etc -du ... (5 Replies)
Discussion started by: manalisharmabe
5 Replies

9. Shell Programming and Scripting

Want to extract particular file from tar.lzo

Hi Guys, Could you please help to get specific files from /di/data/prd/serial/lookup/abetlp11_lookup_20180206.tar.lzo without extracting whole compressed file tar.lzo as its size is huge file name - xyz.lkp Thanks (1 Reply)
Discussion started by: himanshupant
1 Replies

10. UNIX for Advanced & Expert Users

Tar extract Z file

I was looking at this tutorial for tar extract Z file. Is there a reason why this did not work? I checked my man pages and it had a -Z option. tar -xZvf /opt/Nimsoft/nimldr.tar.Z tar (child): compress: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now... (2 Replies)
Discussion started by: cokedude
2 Replies
XT-INSTALL-IMAGE(8)					 Perl Programmers Reference Guide				       XT-INSTALL-IMAGE(8)

NAME
xt-install-image - Install a fresh copy of GNU/Linux into a directory SYNOPSIS
xt-install-image [options] Help Options: --help Show this scripts help information. --manual Read this scripts manual. --version Show the version number and exit. Debugging Options: --verbose Be verbose in our execution. Mandatory Options: --location The location to use for the new installation --dist The name of the distribution which has been installed. Misc Options: --arch Pass the given arch setting to debootstrap or rpmstrap. --config Read the specified config file in addition to the global configuration file. --mirror The mirror to use when installing with 'debootstrap'. --apt_proxy The proxy to use when installing with 'debootstrap'. Installation Options: --install-method Specify the installation method to use. --install-source Specify the installation source to use. --debootstrap-cmd Specify which debootstrap command to use. Defaults to debootstrap if both, debootstrap and cdebootstrap are installed. All other options from xen-create-image will be passed as environmental variables. NOTES
This script is invoked by xen-create-image after to create a new distribution of Linux. Once the script has been created the companion script xt-customize-image will be invoked to perform the network configuration, etc. INSTALLATION METHODS
There are several available methods of installation, depending upon the users choice. Only one option may be chosen at any given time. The methods available are: debootstrap Install the distribution specified by the --dist argument using the debootstrap. If you use this option you must specify a mirror with --mirror. copy Copy the given directory recursively. This local directory is assumed to contain a complete installation. Specify the directory to copy with the --install-source argument. rinse Install the distribution specified by --dist using the rinse command. rpmstrap Install the distribution specified by --dist using the rpmstrap command. tar Untar a .tar file into the new installation location. This tarfile is assumed to contain a complete archived system. Specify the directory to copy with the --install-source argument. AUTHORS
Steve Kemp, http://www.steve.org.uk/ Axel Beckert, http://noone.org/abe/ Dmitry Nedospasov, http://nedos.net/ StA~Xphane Jourdois LICENSE
Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools Development Team. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. 4.3.1 2012-06-30 XT-INSTALL-IMAGE(8)
All times are GMT -4. The time now is 01:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy