General
cancel
Showing results for 
Search instead for 
Did you mean: 

Help with uncompressing from anywere other than /tmp directory

 
SOLVED
Go to solution
AlliedUser
Visitor

Help with uncompressing from anywere other than /tmp directory

Hello group!
I'm not a Unix guru and always ask questions before attenting something new.

I have instructions to uncompress a tar file. The tar file is currently in a unix folder /dbms/peter/HPD/hpe_ltt426_hpux.tar. The instructions call to have the tar file in the /tmp directory and use tar -xvf hpe_ltt426_hpux.tar to uncompress. The tar file is too big to copy into the /tmp directory. Can I uncompress the tar file in it's current directory? In other words, can I execute /dbms/peter/HPD/tar -xvf hpe_ltt426_hpux.tar and have the same results as /tmp/tar -xvf hpe_ltt426_hpux.tar ?

Thanks,

-Peter G

 

3 REPLIES 3
Steven Schweda
Honored Contributor
Solution

Re: Help with uncompressing from anywere other than /tmp directory

> I have instructions [...]

   I can't see them from here.

> [...] to uncompress a tar file. [...]

   And then do what?  If the (invisible) instructions tell you to do
something involving a "/tmp" path, then you'll need to adjust them if
you extract the archive in some other place.

> [...] Can I uncompress the tar file in it's current directory?

   "its", but sure -- anywhere you want (if you have write permission
there, and it has enough space).

> [...] can I execute /dbms/peter/HPD/tar -xvf hpe_ltt426_hpux.tar [...]

   Probably not.  I doubt that the "tar" program will be found at
"/dbms/peter/HPD/tar".  What you could do would be something like:

      cd /dbms/peter/HPD/
      tar -xvf hpe_ltt426_hpux.tar

> [...] /tmp/tar -xvf hpe_ltt426_hpux.tar [...]

   Similarly (as I assume that the (invisible) instructions suggest):

   cd /tmp
   tar -xvf hpe_ltt426_hpux.tar

> [...] and have the same results as [...]

   Essentially, except that the extracted files would be in a different
place.  Depending on what's in /dbms/peter/HPD/ and how the archive was
constructed, it might make some sense to extract the archive contents
into a clean, new directory, and then work with them there.  For
example:

      cd /dbms/peter/HPD/
      mkdir tmp
      cd tmp #                 NOT "/tmp"!
      tar -xvf ../hpe_ltt426_hpux.tar

   Then, when you're finished, you could delete (or do whatever you want
with) the whole "/dbms/peter/HPD/tmp" tree, and you shouldn't have
any/much new clutter in "/dbms/peter/HPD".

   For a good time:

      tar -tvf hpe_ltt426_hpux.tar

and see if the archive was built with a top-level directory.  If all its
member files have paths like, say:

      hpe_ltt426_hpux/file_name1
      hpe_ltt426_hpux/file_name2
      hpe_ltt426_hpux/dir3/file_name3

and so on, instead of, say:

      file_name1
      file_name2
      dir3/file_name3

then you wouldn't need to create a clean, new ("tmp") directory to
isolate the archive contents, because that way they would all be in that
(new) "hpe_ltt426_hpux" directory.

AlliedUser
Visitor

Re: Help with uncompressing from anywere other than /tmp directory

Steve, thank you for your response. I heard from HPE support and they told me that the uncompressing must be performed fro the /tmp directory.

 

-Peter G

 

Steven Schweda
Honored Contributor

Re: Help with uncompressing from anywere other than /tmp directory

> [...] I heard from HPE support and they told me that the uncompressing
> must be performed fro the /tmp directory.

   Sounds to me like drivel.  Did you believe them?

   My Google search for that file name found one (and a
"hpe_ltt426_hpux_1131.tar", which might be newer?), so I fetched a copy,
and looked at it.  I see:

pro3$ tar tfv hpe_ltt426_hpux.tar
-rw-r--r-- 0 root sys 368650240 Mar 14 2018 ./HPE_LTT426.depot
-rwxr--r-- 0 root sys 1798 Mar 14 2018 ./install_hpeltt

   That is, one giant depot and a short installation script.  I don't see
"tmp" anywhere in that script:

pro3$ tar xfv hpe_ltt426_hpux.tar ./install_hpeltt
x ./install_hpeltt

pro3$ grep tmp ./install_hpeltt
pro3$

   I also tried installing it (the "1131" edition):

dyi# uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
                        
dyi# pwd                # Note: Not "/tmp".
/usr/patch/hpeltt/hpe_ltt426_hpux_1131

dyi# ls -l
total 720144
-rw-r--r--   1 root       sys        368701440 Mar 14  2018 HPE_LTT426.depot
-rwxr--r--   1 root       sys           1798 Mar 14  2018 install_hpeltt

dyi# ./install_hpeltt
Installing HPE Library and Tape Tools...
 
Install requires approximately 25MB of free space under /opt
Beginning swinstall process of HPE_LTT to /opt/ltt/

=======  03/18/19 13:18:44 CDT  BEGIN swinstall SESSION
         (non-interactive) (jobid=dyi-0085)

       * Session started for user "root@dyi".
         
       * Beginning Selection
       * Target connection succeeded for "dyi:/".
       * Source:
         /usr/patch/hpeltt/hpe_ltt426_hpux_1131/HPE_LTT426.depot
       * Targets:                dyi:/
       * Software selections:
             HPE_LTT426.HPE_LTT426,r=4.26.0.9,a=S700/800_HPUX_10/11,v=HPE
       * Selection succeeded.
         
         
       * Beginning Analysis and Execution
       * Session selections have been saved in the file
         "/root/.sw/sessions/swinstall.last".
       * "dyi:/":  There will be no attempt to mount filesystems that
         appear in the filesystem table.
       * The execution phase succeeded for "dyi:/".
       * Analysis and Execution succeeded.
         
NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log dyi-0085 @ dyi:/".

=======  03/18/19 13:18:55 CDT  END swinstall SESSION (non-interactive)
         (jobid=dyi-0085)

dyi#


   I rest my case.