LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 01: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, 04:38 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:54 AM
unpack tarball error Stauffenberg Linux - Newbie 4 08-08-2004 03:25 AM
create kernel RPM from tarball? randomx Linux - General 2 07-17-2003 12:01 AM
tarball error rooman Linux - Newbie 3 04-15-2003 04:50 AM
Error when installing NVIDIA Kernel tarball therion12 Linux - General 2 01-19-2002 03:08 AM


All times are GMT -5. The time now is 04:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration