12-16-2009
Not sure how often you run it but you could just add your wanted filename and also add seconds to the date so the names on the same day should be different for sure.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi -
I'm stuck. I have a group of text files created using the split command. My files have the names "projectaa", "projectab", "projectac", etc. What I want to do is add the extension ".txt" to each file. I think I've got part of a sed command together, but I'm stuck on my regex - I keep getting... (9 Replies)
Discussion started by: pepintheshort
9 Replies
2. UNIX for Dummies Questions & Answers
I have a problem where tar is somehow creating duplicate filenames when tarring a directory. Doing an ls on the directory does not show any duplicate filenames, yet when the directory is tarred, you can see that there are duplicates:
bash-2.03# pwd
/var/log/cricket
bash-2.03# ls -1 | sort |... (2 Replies)
Discussion started by: dangral
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files.
a) /usr/users/oracle/bin
b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies
5. Shell Programming and Scripting
Hi Friends,
I want to know the command to add a new file in a existing tar file.
For Ex:
I have a tar file file1.tar with the contents
one.txt
two.txt
three.txt
Now I need to add file four.txt to this existing tar file, how can I do it?
Thanks in advance (4 Replies)
Discussion started by: mr_manii
4 Replies
6. Shell Programming and Scripting
Hi
I would like to use tar cmd in my script.
I have a variable with filenames, e.g. 1000 records and I would like to paste its values into tar cmd.
For this example I used three elements variable strings.
strings="file1.txt file2.txt file3.txt"
`tar cf file1.tar $strings`
Whether... (1 Reply)
Discussion started by: presul
1 Replies
7. Shell Programming and Scripting
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies
8. UNIX for Dummies Questions & Answers
I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it.
Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem?
tar tvf file1.tar
... (1 Reply)
Discussion started by: vivien_chu
1 Replies
9. AIX
Coming from this thread, just wondering if there is an option to check if the Tar of the files/directory will be without any file-errors without actually making the tar.
Scenario:
Let's say you have a directory of 20GB, but you don't have the space to make Tar file at the moment, and you want... (14 Replies)
Discussion started by: filosophizer
14 Replies
LEARN ABOUT PHP
dateinterval.createfromdatestring
DATEINTERVAL.CREATEFROMDATESTRING(3) 1 DATEINTERVAL.CREATEFROMDATESTRING(3)
DateInterval::createFromDateString - Sets up a DateInterval from the relative parts of the string
SYNOPSIS
publicstatic DateInterval DateInterval::createFromDateString (string $time)
DESCRIPTION
Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string.
PARAMETERS
o $time
- A date with relative parts. Specifically, the relative formats supported by the parser used for strtotime(3) and DateTime will
be used to construct the DateInterval.
EXAMPLES
Example #1
Parsing valid date intervals
<?php
// Each set of intervals is equal.
$i = new DateInterval('P1D');
$i = DateInterval::createFromDateString('1 day');
$i = new DateInterval('P2W');
$i = DateInterval::createFromDateString('2 weeks');
$i = new DateInterval('P3M');
$i = DateInterval::createFromDateString('3 months');
$i = new DateInterval('P4Y');
$i = DateInterval::createFromDateString('4 years');
$i = new DateInterval('P1Y1D');
$i = DateInterval::createFromDateString('1 year + 1 day');
$i = new DateInterval('P1DT12H');
$i = DateInterval::createFromDateString('1 day + 12 hours');
$i = new DateInterval('PT3600S');
$i = DateInterval::createFromDateString('3600 seconds');
?>
RETURN VALUES
Returns a new DateInterval instance.
PHP Documentation Group DATEINTERVAL.CREATEFROMDATESTRING(3)