LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-22-2003, 12:37 PM   #1
everythingand2
Member
 
Registered: Oct 2003
Location: Kansas City, MO
Distribution: Slackware 9.1
Posts: 61

Rep: Reputation: 15
how to create error log for tarball


This is a pretty simple question...

I have a script that runs in cron which backs up a certain directory and saves it to a file. I'm wanting to also display any error messages while doing this backup in a separate file. What would the syntax be for this? This is what I have right now:

tar -c /usr/local/backups/htdocs.bak > /usr/local/backups/htdocsbak.tar

Thanks,
Brad
 
Old 11-22-2003, 03:38 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Something like
tar -c /usr/local/backups/htdocs.bak > /usr/local/backups/htdocsbak.tar 2>/use/local/backups/errors

'2' is standard error output. 2>/somewhere command redirects standard erro output (whet means: error messages) to the file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create error log for broken apps? banj0 Slackware 4 09-16-2005 01:54 AM
unpack tarball error Stauffenberg Linux - Newbie 4 08-08-2004 02:25 AM
create kernel RPM from tarball? randomx Linux - General 2 07-16-2003 11:01 PM
tarball error rooman Linux - Newbie 3 04-15-2003 03:50 AM
Error when installing NVIDIA Kernel tarball therion12 Linux - General 2 01-19-2002 02:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration