LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-29-2004, 11:55 PM   #1
chtla
LQ Newbie
 
Registered: Apr 2003
Posts: 6

Rep: Reputation: 0
tar error.. help..


# cat last_date
2004-03-30 14:48:46

# vi back.sh
===========================================
#!/bin/bash

from_dir="/var/spool/mail"
to_dir="/home/mail/"
file=`date +%Y%m%d%H%M%S`
today=`date "+%Y-%m-%d %H:%M:%S"`
to_file=${file}.tar.gz
last_file="last_date"

if [ -f /home/mail/last_date ]
then
tar cvfz ${to_dir}${to_file} -N `cat ./last_date` ${from_dir}
else
tar cvfz ${to_dir}${to_file} ${from_dir}
fi
echo $today > ${to_dir}${last_file}
============================================

tar: 14\:48\:24: Cannot stat: not found file or directory
tar: Removing leading `/' from member names
var/spool/mail/
var/spool/mail/aaa
tar: Error exit delayed from previous errors

i don't know what problem..
Any help will be appreciated.
Thanks
 
Old 03-30-2004, 04:53 AM   #2
Punboy
Member
 
Registered: Mar 2004
Posts: 32

Rep: Reputation: 15
You need to put a \ before every space in the lastdate string.
 
  


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 can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
getting error during "tar -xvzf filename.tar.gz" b0nd Linux - Newbie 11 04-23-2005 08:50 PM
Tar gives error when creating a tar file archive davidas Linux - Newbie 10 04-13-2004 12:35 AM
Error while installing package.tar.tar isone Linux - Software 2 11-03-2003 11:58 AM
problem unzipping a tar.bz2 file tar: Error is not recov jyome Linux - Software 4 09-04-2003 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:38 PM.

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