Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-02-2005, 09:07 PM   #1
LQ Newbie
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
Help! tar file's name is truncated


I am currently running a script in crontab. The script would take the files from a certain folder and tar them according to the date and system time but the output filename i get from the tar file is incomplete.

Eg. `date +'A%Y%M%e%k%M%SA'`.tar *.log
my output would be A200503021 and there would be an error 24523A.tar: No file or directory found.

Assuming the time is 12:45:23

How do i solve this problem?

p.s. I dont think its the filename length problem as, if i remove the %Y my output would be A03021
Old 03-02-2005, 10:09 PM   #2
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Why the '%e'? That's putting a space in instead of a zero, so
date +%A%Y%M%d%k%M%SA
would work. Or you can try double-quoting the date string
"`date +'A%Y%M%e%k%M%SA'`"

-- Oh, and to clarify, it's not be 'truncated', exactly - it's just being treated as two filenames because of the whitespace separator.

Last edited by slakmagik; 03-02-2005 at 10:10 PM.


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 can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 03:48 AM
Truncated IP??? What? slaken Linux - Networking 5 05-12-2004 04:51 AM
file's extension??? amanjsingh Linux - Newbie 2 04-17-2004 10:22 AM
Truncated 'last' output, please help! Hackeron Linux - General 1 01-04-2004 09:34 AM
Output truncated when using pipe tells Linux - General 1 12-16-2003 09:06 PM > Forums > Linux Forums > Linux - Newbie

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

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