- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tee 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
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
12-13-2001 12:50 AM
12-13-2001 12:50 AM
If I try "tar -cvf /dev/rmt/1mn home opt | tee /backuplogs/bkp1.log" , system is not creating the log file. It is only displaying the o/p on screen.
What may be the possible reasons?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 12:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:02 AM
12-13-2001 01:02 AM
Re: tee command
It would appear that tar outputs it verbose text to standard error. Try the same command with
tar cvf tarfile file 2> logfile
Obviously this doen't help you with tee. A look at the man page for tee doesn't give any indication that you can use it with standard error, only standard out.
Regards,
Simon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:03 AM
12-13-2001 01:03 AM
Re: tee command
tar -cvf /dev/rmt/1mn home opt 2>&1 | tee /backuplogs/bkp1.log
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:07 AM
12-13-2001 01:07 AM
Re: tee command
2=stderr & 1=stdoutput right? then what does "2>&1" will do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:08 AM
12-13-2001 01:08 AM
Re: tee command
You need to redirect the tar ouput : tar cvf /dev/rmt/1mn home opt 2>&1 | tee ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:11 AM
12-13-2001 01:11 AM
Re: tee command
Normal output and errors are sent to two different file descriptors so that you can distinguish between them in a script. Normally filedescriptors 1 and 2 are both set to your display.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:11 AM
12-13-2001 01:11 AM
Re: tee command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:13 AM
12-13-2001 01:13 AM
Re: tee command
2>&1 simply means file descriptor 2 (stderr) is a duplicate of file descriptor 1 (stdout), in other words stderr is sent out as if it were stdout.
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:25 AM
12-13-2001 01:25 AM
Re: tee command
I am able to come out of it.