- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- crontab output redirection
Operating System - HP-UX
1820390
Members
3954
Online
109623
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО05-10-2000 08:42 PM
тАО05-10-2000 08:42 PM
crontab output redirection
I have unsuccessfully tried to redirect output from a "tar" backup job in my crontab to a file using the following in my root crontab:
0 2 * * * tar cv "files" > /tmp/logfile
Output always goes to the root mail account.
I have also found that I cannot redirect any output from the "tar" command.
HP-UX 10.20
Please advise.
0 2 * * * tar cv "files" > /tmp/logfile
Output always goes to the root mail account.
I have also found that I cannot redirect any output from the "tar" command.
HP-UX 10.20
Please advise.
And Loving It
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-10-2000 11:16 PM
тАО05-10-2000 11:16 PM
Re: crontab output redirection
You also need to redirect the error out. Using the example you gave only the standard out would go to the logfile and any error messages would go to your mail.
Use the following syntax;
0 2 * * * tar cv "files" > /tmp/logfile 2>&1
This means also send error out (2) to standard out (1).
John
Use the following syntax;
0 2 * * * tar cv "files" > /tmp/logfile 2>&1
This means also send error out (2) to standard out (1).
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2000 07:08 AM
тАО05-11-2000 07:08 AM
Re: crontab output redirection
use the standard error redirect in your crontab.
i.e crontab command 2> /tmp/out
or crontab command 2>> /tmp/out if you want to append to the file.
i.e crontab command 2> /tmp/out
or crontab command 2>> /tmp/out if you want to append to the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2000 04:55 PM
тАО05-14-2000 04:55 PM
Re: crontab output redirection
Pardon the pun but 'tar'.
I had tried using stderr redirection though
I had been placing it as follows
tar cv 2>&1 > /tmp/logfile
ie: the cart before the horse.
Thanks
I had tried using stderr redirection though
I had been placing it as follows
tar cv
ie: the cart before the horse.
Thanks
And Loving It
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP