Today is 28 July 2016, below command will change the access time and modification time of file hello.txt to 21 July 2016 13:00 hrs
There is no creation time, therefore it cannot be changed :-)
Last edited by rbatte1; 07-28-2016 at 07:42 AM..
Reason: Added CODE tags
I have to capture the creation date and time stamp for a file. The ls command doesn't list all the required information. I need year, month, day, hour, minute and second.
Any ideas... (1 Reply)
I am trying to insert a line with a date stamp in a file that is used to monitor activity in one of our directories. By doing this, I want to grep that file each day and go to the last entry for each time a error occurred and pull all errors generated if any exist. If error exists I want that error... (3 Replies)
Hi,
Plz suggest me how can i change the date of a file.
Suppose my file has been created in some date and i want to give it present date.
How can i do this???? (2 Replies)
can we change the timestamp of a file to old date.
-rwxrwxrwx 1 root other 330 Jul 1 16:03 abc.txt
it shows creation time is 16.03 can i change it to previous time
:) (2 Replies)
Hi,
As i know , we can change the time stamp of a file by touch command, i did change in a file and it is looking as given
# ls -l abcd
-rw-r--r-- 1 batsoqa sicusers 0 Feb 17 2010 abcd
actually i want to see the output like this
-rw-r--r-- 1 batsoqa sicusers ... (3 Replies)
Hi
When i do ls -ltr <file1> then it shows me the date and time of the file
if - for whatever reason file has future date/time stamp then ls -ltr is not showing the time, it just shows only date part ... even if time is ahead by 2 hr than current time.
suppose a file was copied from INDIA... (3 Replies)
Hi
I use "touch -t xxxxxxxx" command to set date/time stamp of a file. My requirement is to read the date/time stamp of a file and apply it to another file.
Is there anyway to do it simple instead of manually taking date/stamp of first file?
TIA
Prvn (2 Replies)
Hi!
Please see our current script:
#!/usr/bin/ksh
if (egrep "This string is found in the log" /a01/bpm.log)
then
mailx -s "Error from log" me@email.com, him@email.com </a01/bpm.log
fi
To the above existing script, we need to add the following change:
1) After finding the string,... (7 Replies)
hi,
i have a Archive directory in which files are archived or stored with date and time stamp to prevent over writing.
example:
there are 5 files
s1.txt
s2.txt
s3.txt
s4.txt
s5.txt
while moving these files to archive directory, date and time stamp is added.
of format `date... (9 Replies)
Hi ,
I want to add a new column 'current_time stamp' in my existing csv file with current time stamp for all the records.I tried something this but this is printing 0 with date & time and printed date one line above header.Please help
awk -F "," 'BEGIN{ OFS="," } {$6=system("date... (5 Replies)
Discussion started by: netdbaind
5 Replies
LEARN ABOUT DEBIAN
prima::calendar
Prima::Calendar(3) User Contributed Perl Documentation Prima::Calendar(3)NAME
Prima::Calendar - standard calendar widget
SYNOPSIS
use Prima::Calendar;
my $cal = Prima::Calendar-> create(
useLocale => 1,
onChange => sub {
print $_[0]-> date_as_string, "
";
},
);
$cal-> date_from_time( localtime );
$cal-> month( 5);
DESCRIPTION
Provides interactive selection of date between 1900 and 2099 years. The main property, date, is a three-integer array, day, month, and
year, in the format of perl localtime ( see "localtime" in perlfunc ) - day can be in range from 1 to 31,month from 0 to 11, year from 0 to
199.
API
Events
Change
Called when the date property is changed.
Properties
date DAY, MONTH, YEAR
Accepts three integers in format of "localtime". DAY can be from 1 to 31, MONTH from 0 to 11, YEAR from 0 to 199.
Default value: today's date.
day INTEGER
Selects the day in month.
firstDayOfWeek INTEGER
Selects the first day of week, an integer between 0 and 6, where 0 is Sunday is the first day, 1 is Monday etc.
Default value: 0
month
Selects the month.
useLocale BOOLEAN
If 1, the locale-specific names of months and days of week are used. These are read by calling "POSIX::strftime". If invocation of
POSIX module fails, the property is automatically assigned to 0.
If 0, the English names of months and days of week are used.
Default value: 1
See also: date_as_string
year
Selects the year.
Methods
can_use_locale
Returns boolean value, whether the locale information can be retrieved by calling "strftime".
month2str MONTH
Returns MONTH name according to useLocale value.
make_months
Returns array of 12 month names according to useLocale value.
day_of_week DAY, MONTH, YEAR, [ USE_FIRST_DAY_OF_WEEK = 1 ]
Returns integer value, from 0 to 6, of the day of week on DAY, MONTH, YEAR date. If boolean USE_FIRST_DAY_OF_WEEK is set, the value of
"firstDayOfWeek" property is taken into the account, so 0 is a Sunday shifted forward by "firstDayOfWeek" days.
The switch from Julian to Gregorian calendar is ignored.
date_as_string [ DAY, MONTH, YEAR ]
Returns string representation of date on DAY, MONTH, YEAR according to useLocale property value.
date_from_time SEC, MIN, HOUR, M_DAY, MONTH, YEAR, ...
Copies date from "localtime" or "gmtime" result. This helper method allows the following syntax:
$calendar-> date_from_time( localtime( time));
AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>.
SEE ALSO
Prima, Prima::Widget, POSIX, "localtime" in perlfunc, "time" in perlfunc, examples/calendar.pl.
perl v5.14.2 2009-02-24 Prima::Calendar(3)