Operating System - HP-UX
1832304 Members
2093 Online
110041 Solutions
New Discussion

How to tar a file with @ suffix out

 
Rambo_1
Regular Advisor

How to tar a file with @ suffix out

Hi
I want to tar a file which with a @ suffix (for example: oracle.1@2 )to host, what option should I used ?

Thanks
8 REPLIES 8
Slawomir Gora
Honored Contributor

Re: How to tar a file with @ suffix out

Hi,

on linux it works on hpux a can't check it now, but try:

tar cvf output.tar 1\@2


Sยภเl Kย๓คг
Respected Contributor

Re: How to tar a file with @ suffix out

tar cvf output.tar 1\@2 should do.I too didn't try in HP,but was successful with linux
regards
SK
Your imagination is the preview of your life's coming attractions
Muthukumar_5
Honored Contributor

Re: How to tar a file with @ suffix out

We can simply make tar as,


touch tartestfile.1@2

tar -cvf test.tar tartestfile.1@2

tar -xvf /tmp/test.tar

- Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: How to tar a file with @ suffix out

IF you want to archieve at ony host and send it another host with extracted then,


host1: setup rhosts file to allow host2
host2: setup rhosts file to allow host1

test example:
host1:

/tmp/testfile1.@
/tmp/testfile2.@

cd /tmp/; tar cvf - testfile*.@ | remsh host2 "cd /tmp/testdir/; tar xfv - "

It will do it.

Note: No delimitation with \ for @ symbol there on files over shell

Regards
Muthu
Easy to suggest when don't know about the problem!
Bill Hassell
Honored Contributor

Re: How to tar a file with @ suffix out

@ is not normally a special character unless you have bypassed /etc/profile and .profile when you login. Type the command:

echo @

If this does nothing, then type the command:

stty -a

and see if kill=@ which is the old (and very obsolete) default setting. You should see a line like this in your .profile:

stty erase "^H" kill "^U" intr "^C" eof "^D"

but if you are running on a workstation using Xwindows and started a terminal window such as xterm or dtterm, you bypassed all the 'normal' HP-UX login profiles and stty will report the old default values. You can manually change the values by pasting the above stty setting line into your command line. But you'll continue to have problems in other areas because normal profiles are not being run.

Xwindows has a very complex set of rules about what happens when the desktop runs (VUE or CDE) and what happens when a terminal emulator runs (dtterm, xterm or hpterm). The default is always to ignore /etc/profile and .profile so logins are non-standard compared to a telnet login.

The easiest way to fix this is to tell all the terminal emualtors to perform a true login. This can be done by creating a .Xdefaults file for each user:

echo '*loginShell: true' >> $HOME/.Xdefaults

Note that spelling and capitalization is important. Now when the you run a terminal window, you will see the actions of /etc/profile and .profile rather then a simple prompt. .Xdefaults can be to customize the appearance and other options for all Xwindow programs.


Bill Hassell, sysadmin
Franky_1
Respected Contributor

Re: How to tar a file with @ suffix out

Hi,

you can try the following :

tar cfv oracle.1\@2

This should work

Regards

Franky
Don't worry be happy
Muthukumar_5
Honored Contributor

Re: How to tar a file with @ suffix out

Bill Hassell,

Your are always great on every forum reply.
As a beginner, I feel great and glad to have your knowledge and experience.

Keep up your great sharing to ALL.

- Muthu

Easy to suggest when don't know about the problem!
Rambo_1
Regular Advisor

Re: How to tar a file with @ suffix out

So thanks for your advice in help.I will have a try and assign point later .thanks again for all !!