- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- about tar command!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 01:57 PM
03-11-2004 01:57 PM
the content of hosts is printed on console
i must #tar cvf /dev/rmt/0m /etc/hosts
why
is there something wrong with my tape drive or configuration ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 02:07 PM
03-11-2004 02:07 PM
Re: about tar command!
Apparently you /dev/rmt/0m is not set as the default destination for tar so you are just getting output sent to stdout which is your terminal. I am really not sure where that is set, but I wouldn't worry about it too much. Just explicitly specify your destination and you can be fairly certain that it will work 100% of the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 02:14 PM
03-11-2004 02:14 PM
Re: about tar command!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 02:16 PM
03-11-2004 02:16 PM
Re: about tar command!
"f" in tar tvf specifies the device file name. and the default archive file for tar is /dev/rmt/0m. There could not be any problem with your tape drive.
see man tar for details
regds
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 03:16 PM
03-11-2004 03:16 PM
Re: about tar command!
Going to the console is unique.
Like patrick says use the -f parameter and controll it.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 05:56 PM
03-11-2004 05:56 PM
Re: about tar command!
Use insf -e and then try for your command If it does'nt work then better use tar -cvf /dev/rmt/0m
Or create a script and user tar -cvf in it.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 06:21 PM
03-11-2004 06:21 PM
SolutionAlso you could check which tar you are running with 'which tar'.. The run a what on that tar.. In one command you could run 'what $(which tar)'.
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 08:00 PM
03-11-2004 08:00 PM
Re: about tar command!
HP-UX nvl2 B.11.00 A 9000/861 2003908693 two-user license
nvl1:/> which tar
/usr/local/bin/tar
nvl1:/> echo $PATH
/usr/sbin:/usr/local/bin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/sbin:/etc:/
opt/nettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:/opt/pd/bin:/usr/con
trib/bin/X11:/usr/bin/X11:/opt/hparray/bin:/opt/ignite/bin:/opt/resmon/bin:/usr/
sbin/diag/contrib:/opt/pred/bin:/sbin:/home/root
now i know i am using the /usr/local/bin/tar
is there difference among /usr/bin/tar , /sbin/tar and /usr/local/bin/tar
how can i change the PATH enviroment variable to move /usr/bin to be before /usr/local/bin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 08:14 PM
03-11-2004 08:14 PM
Re: about tar command!
Yes, there is a difference between /usr/bin/tar, /sbin/tar and /usr/local/bin/tar. The first two are standard HP-UX and differ "only" in linking:
/usr/bin/tar: PA-RISC1.1 shared executable dynamically linked
/sbin/tar: PA-RISC1.1 shared executable
The latter "could be anything". And definitely seem to have stdout as default device.
As for the order of patche in PATH all you have to do is change the order. But where to do that depends on where it is set. It could be the default path - check /etc/PATH or it could be set in /etc/profile or $HOME/.profile. I would reccomed putting /usr/local/bin and /usr/contrib/bin at the end as they mau contain commands with the same name as "system commands". As is the case with tar.
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2004 01:12 AM
03-12-2004 01:12 AM
Re: about tar command!
I have GNU tar installed on a couple of my machines and I just tried doing:
# /opt/tar/bin/tar -cv /etc/hosts
and the output printed to my terminal. I would say that this is probably normal for GNU tar.
If you don't want this behavior, then just specify the '-f destination' option. Yes, it's a few more keystrokes. So what!
As I said above, I much prefer knowing exactly where my output is going thus I always use '-f destination' in my tar commands.