Operating System - HP-UX
1834789 Members
2986 Online
110070 Solutions
New Discussion

unTar a specific file from remote

 
SOLVED
Go to solution
Shermaine Yvonne Tan
Occasional Advisor

unTar a specific file from remote

During tar, the command used is
tar cvf - * | remsh [I]system_name[/I] dd of=/dev/rmt/0m bs=10k

To untar all, we used
remsh [I]system_name[/I] "dd if=/dev/rmt/0m ibs=10k" | tar xvf -

Question?
How to untar a specific file from remote?
Thanks alot...
5 REPLIES 5
RAC_1
Honored Contributor
Solution

Re: unTar a specific file from remote

remsh [I]system_name[/I] "dd if=/dev/rmt/0m ibs=10k" | tar xvf - "specific_file"

Anil
There is no substitute to HARDWORK
Franky_1
Respected Contributor

Re: unTar a specific file from remote

Hi,

just add the desired filename

remsh "dd if=/dev/rmt/0m | tar xfv -

HTH

Franky
Don't worry be happy
Massimo Bianchi
Honored Contributor

Re: unTar a specific file from remote

Hi,
should be

remsh [I]system_name[/I] "dd if=/dev/rmt/0m ibs=10k" | tar xvf - FILENAME

from "man tar"
NAME
tar - tape file archiver

SYNOPSIS
tar [-]key [arg ...] [file | -C directory] ...

file specifies a file being saved or restored. If file is a
directory name, it refers to the files and (recursively)
the subdirectories contained in that directory.


Steve Steel
Honored Contributor

Re: unTar a specific file from remote

Hi


Just add the filename to your extract command as it was written on the tape

Ex

remsh [I]system_name[/I] "dd if=/dev/rmt/0m ibs=10k" | tar xvf - /home/mimi/.profile


Steve Steel

If you want truly to understand something, try to change it. (Kurt Lewin)
Borislav Perkov
Respected Contributor

Re: unTar a specific file from remote

Hi,
I think you can try with

remsh [I]system_name[/I] "dd if=/dev/rmt/0m ibs=10k" | tar xvf - file_name

where file_name is the name of the file you want to extract.

Regards,
Borislav