Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Search for a file with Current Date Post 302318003 by sandeep_1105 on Wednesday 20th of May 2009 01:22:57 PM
Old 05-20-2009
Search for a file with Current Date

Hi,

How can we search for a file with current date(sysdate).

Actually i want the file name from a directory which was created today(current date).

For example i have a dir /home/arch and i have files with name aglito03axyz.datetimestamp in this directory, but all these files were created on different dates. suppose we have 3 files :

dba May 18 00:06 aglito03axyz.20090518000506.arc
dba May 19 00:07 aglito03axyz.20090519000511.arc
dba May 20 00:07 aglito03axyz.20090520000506.arc

from the above we have 3 files with name aglito03axyz.datetimestamp and were created on different days, suppose i want the file created today(May 20th 2009) then i should get the file name as aglito03axyz.20090520000506.arc.

How can this be achieved.

Thanks
Sandeep
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File date vs Current date

I am a newbie in shell scripting, hope you can advice how can I compare the date/time of file extracted from 'll' and current system date/time. I have done the following: ll -rt > $FILE_AGE_LOG FILE_DATETIME=`more $FILE_AGE_LOG | head -02 | cut -c 45-57` It returns 'May 4 19:11'. If I... (4 Replies)
Discussion started by: trexlim
4 Replies

2. Shell Programming and Scripting

Perl: Extracting date from file name and comparing with current date

I need to extract the date part from the file name (20080221 in this ex) and compare it with the current date and delete it, if it is a past date. $file = exp_ABCD4_T-2584780_upto_20080221.dmp.Z really appreciate any help. thanks mkneni (4 Replies)
Discussion started by: MKNENI
4 Replies

3. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

4. Shell Programming and Scripting

Script to Search Logs Several Directories Pulling out Only Current Date

Hi All.. I'm seeking assistance with editing a script to search log files in several directories. I'm close to what I'm seeking, but need additional guidance. The log files are always listed by current date; however, inside the log file includes dates that go back to 2011. What I'm... (6 Replies)
Discussion started by: lenaf7
6 Replies

5. Shell Programming and Scripting

current date modified file

Hi , In my directory , i have many days file but i want to see all those which are of todays date. i tried this but it gives all the files mtime -0 |ls -ltr I tried the below option as well. 19635 find -iname "*.LOG" -mtime 19636 ls -ltr *.LOG -mtime -1 19637 ls -ltr *.LOG... (7 Replies)
Discussion started by: guddu_12
7 Replies

6. Debian

Search files that start with current date

hi all, i need to find same files in my directory that looks like this format 20121017145949639.xml (YYYYMMDD*.xml) thanks for help (3 Replies)
Discussion started by: merouan
3 Replies

7. Shell Programming and Scripting

Get file name which include the current date

Hi, I'm trying to get the name of a file that has the current date in the name. The filename is on the form A<current date>01.DC, for example A2012110501.DC I have this script so far date +%y%m%d D=$(date +%y%m%d) N=A20$D echo $N N2={$N}01.DC echo $N2 And gets the following... (12 Replies)
Discussion started by: Immelstorn
12 Replies

8. Shell Programming and Scripting

Subtract a file's modification date with current date

SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise Hi, In a folder, there are files. I have a script which reads the current date and subtract the modification date of each file. How do I achieve this? Regards, Joe (2 Replies)
Discussion started by: roshanbi
2 Replies

9. UNIX for Beginners Questions & Answers

“sed” replace date in text file with current date

We want to call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below: abc.txt ------------------ Code: line1 line2 line3 $$EDWS_DATE_INSERT=08-27-2019 line4 $$EDWS_PREV_DATE_INSERT=08-26-2019 I am trying to write a... (3 Replies)
Discussion started by: pradeepp
3 Replies

10. UNIX for Beginners Questions & Answers

Replace date in file every day with current date

I Have text like XXX_20190908.csv.gz need to replace Only date in this format with current date every day Thanks! (1 Reply)
Discussion started by: yamasani1991
1 Replies
CAIRO_ARC(3)								 1							      CAIRO_ARC(3)

CairoContext::arc - Adds a circular arc

       Object oriented style (method):

SYNOPSIS
public void CairoContext::arc (float $x, float $y, float $radius, float $angle1, float $angle2) DESCRIPTION
Procedural style: void cairo_arc (CairoContext $context, float $x, float $y, float $radius, float $angle1, float $angle2) Adds a circular arc of the given radius to the current path. The arc is centered at ($x, $y), begins at $angle1 and proceeds in the direc- tion of increasing angles to end at $angle2. If $angle2 is less than $angle1 it will be progressively increased by 2*M_PI until it is greater than $angle1. If there is a current point, an initial line segment will be added to the path to connect the current point to the beginning of the arc. If this initial line is undesired, it can be avoided by calling CairoContext::newSubPath or procedural cairo_new_sub_path(3) before calling CairoContext::arc or cairo_arc(3). Angles are measured in radians. An angle of 0.0 is in the direction of the positive X axis (in user space). An angle of M_PI/2.0 radians (90 degrees) is in the direction of the positive Y axis (in user space). Angles increase in the direction from the positive X axis toward the positive Y axis. So with the default transformation matrix, angles increase in a clockwise direction. (To convert from degrees to radians, use degrees * (M_PI / 180.).) This function gives the arc in the direction of increasing angles; see CairoContext::arcNegative or cairo_arc_negative(3) to get the arc in the direction of decreasing angles. PARAMETERS
o $context - A valid CairoContext object o $x - x position o $y - y position o $radius - Radius of the arc o $angle1 - start angle o $angle2 - end angle RETURN VALUES
No value is returned. EXAMPLES
Example #1 Object oriented style <?php $s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100); $c = new CairoContext($s); $c->setSourceRgb(0, 0, 0); $c->paint(); $c->setLineWidth(1); $c->setSourceRgb(1, 1, 1); for ($r = 50; $r > 0; $r -= 10) { $c->arc(50, 50, $r, 0, 2 * M_PI); $c->stroke(); $c->fill(); } $s->writeToPng(dirname(__FILE__) . '/CairoContext__arc.png'); ?> Example #2 Procedural style <?php $s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100); $c = cairo_create($s); cairo_set_source_rgb($c, 0, 0, 0); cairo_paint($c); cairo_set_source_rgb($c, 1, 1, 1); cairo_set_line_width($c, 1); for ($r = 50; $r > 0; $r -= 10) { cairo_arc($c, 50, 50, $r, 0, 2 * M_PI); cairo_stroke($c); cairo_fill($c); } cairo_surface_write_to_png($s, dirname(__FILE__) . '/cairo_arc.png'); ?> SEE ALSO
CairoContext::arcNegative. PHP Documentation Group CAIRO_ARC(3)
All times are GMT -4. The time now is 08:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy