what do you mean by "a particular date"? There are three time stamps associated with each file's inode.
1. Access Time: The time when the file was last read
2. Modify Time: The time when the file's content was last changed
3. Change Time: The time when the file's attributes (i.e permission, etc) were last changed
Which time you are looking for? Assuming you are looking for modification time, say we need to delete files which were last modified on November 12, 2011 (exactly 47 days ago), run the below command:
I have list of files named file_username_051208_025233.log. Here 051208 is the date and 025233 is the time.I have to run thousands of files daily.I want to put all the files depending on the date of running into a date directory.Suppose if we run files today they should put into 05:Dec:08... (3 Replies)
Hello,
I have several files in a specific directory.
A specific string in one file can occur in another files.
If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string.
Example.
file1
ShortName "Blue... (2 Replies)
Hi ,
I am trying to make a cron job to delete the contents of a directory in a linux environment.The contents created before 2 days should get deleted by this job.Here is what i have written :
/usr/bin/find / -name *.log -ctime +2 -exec /bin/rm -f {} \;
Is it correct....If not so,please... (9 Replies)
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
Need a ksh script to get the files that were created or modified in a directory on a particular date entered by the user.
For example if a directory contains files as below :
> ll
total 41
-rw-rw-r-- 1 psn psn 199 Aug 23 07:06 psn_roll.sh
-rw-rw-r-- 1 psn psn ... (10 Replies)
Hi,
I have below directories
Direct 2013-08-12 23123
Direct 2013-08-13 24121
Direct 2013-08-14 34513
Direct 2013-08-31 15435
...........
Direct 2013-09-12 53145
Direct 2013-09-30 65234
Direct 2013-09-30 89642 (11 Replies)
he following are the files available in my directory
RSK_123_20141113_031500.txt
RSK_123_20141113_081500.txt
RSK_126_20141113_041500.txt
RSK_126_20141113_081800.txt
RSK_128_20141113_091600.txt
Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
I'm quite new to Unix but I want to delete some old backup files stored in a directory.
the backups are stored on a network storage device located at /mnt/terastation12/backup. I want to delete everything upto one month ago. would the following command in Unix Sun do that?
find... (5 Replies)
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies
LEARN ABOUT DEBIAN
time.localtime
Time.localTime(3kaya) Kaya module reference Time.localTime(3kaya)NAME
Time::localTime - Convert a time to local time.
SYNOPSIS
Time localTime( Int secs=now() )
ARGUMENTS
secs The number of seconds since Jan 1 1970. This argument is optional and defaults to the current time.
DESCRIPTION
Converts a time expressed in seconds since Jan 1 1970 to a Time.Time(3kaya) , using the current local timezone.
AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/
LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License (version 2.1 or any later version) as published by the Free Software Foundation.
RELATED Time.Time(3kaya)Time.gmTime(3kaya)Time.mkTime(3kaya)Time.time(3kaya)Kaya October 2012 Time.localTime(3kaya)