File Modification Time, also known as mtime. On a UNIX filesystem, concepts similar to mtime include atime (access time) and ctime (metadata change time).
Questions tagged [filemtime]
143 questions
2
votes
1 answer
Linux - Finding the max modified date of each set of files in each directory
path/mydir contains a list of directories. The names of these directories tell me which database they relate to.
Inside each directory is a bunch of files, but the filenames tell me nothing of importance.
I'm trying to write a command in linux bash…

ComputersAreNeat
- 175
- 1
- 1
- 11
2
votes
1 answer
How can I configure npm update to update mtime of files?
npm install and npm update install files in node_modules. The modified timestamps of these files are not what you expect: the time that these files were last installed or updated in the local filesystem. Instead, npm deliberately (I think) ensures…

Flimm
- 136,138
- 45
- 251
- 267
2
votes
2 answers
How to touch a file/update its modification time on disk in Nim?
I'd like to update the modification time of some files in Nim, without actually modifying them, like Unix touch. I see there is an os.getLastModificationTime function, or more broadly os.getFileInfo, but I do not see corresponding set functions.
How…

Keith Pinson
- 7,835
- 7
- 61
- 104
2
votes
1 answer
PHP touch() is not affected by file permissions?
I have setup a demo "admin" website with all file permissions set to 555 for directories and 444 for files so that any "save" functionality is disabled. So far so good.
However, I noticed that the PHP touch() function is unaffected by file…

suncat100
- 2,118
- 1
- 17
- 22
2
votes
0 answers
How to change last modified date of artifacts in Artifactory Pro?
I'm asking here on Stack Overflow because of this.
I have created a "generic" repository on Artifactory, to contain ZIP-files.
Originally these zipfiles were on a webserver (either Apache or Nginx) with an indexed directory. It made more sense to…

Amedee Van Gasse
- 7,280
- 5
- 55
- 101
2
votes
2 answers
Find date file was last modified
I am setting up a page that will display the last date the file was modified. From what I understand I need to mtime to get this date, but how to do I reference the file?

Boss Nass
- 3,384
- 9
- 48
- 90
2
votes
4 answers
Filemtime/cachetime where am I going wrong?
What I am trying to do is check the age of an image, if its older than 60 minutes then run another php page to fetch images otherwise do nothing if less than 60 minutes old....
The script isn't opening the 2nd page (radartest.php) and running it to…

Gary
- 21
- 1
- 3
2
votes
2 answers
can't save file name without path , combination with grep and awk?
find /user/stc/tmp -mmin -200 -ls | grep '.txt' | awk '{print $8, $9, $10, $11}' >> tempresult.txt
First of all I am a newbie,
I am trying to find out ONLY .txt files modified in last week(in home/user/temp) and save the result to a file.
so some…

Reyaz eon
- 23
- 2
2
votes
2 answers
Known problems with filemtime() on Windows - files getting touched arbitrarily?
Is there a known issue leading to file modification times of cache files on Windows XP SP 3 getting arbitrarily updated, but without any actual change?
Is there some service on a standard Windows XP - Backup, Sync, Versioning, Virus scanner - known…

Pekka
- 442,112
- 142
- 972
- 1,088
2
votes
1 answer
How to get locale-independent modified time and creation time of a file in batch?
With batch variable/parameter expansion like %~t1 one can get a timestamp of a file.
I would like to set the year of the file to another variable would like to support multiple locales.
How can you get a file's datetime, independent of locale and…

n611x007
- 8,952
- 8
- 59
- 102
2
votes
2 answers
Deterministic directory mtime with git repositories
With the git-restoremtime script it is possible to amend the modification time of files checked out from a git repository based on the dates in commit messages.
However, how would you make the mtime of the directories appear intuitive, deterministic…

cnst
- 25,870
- 6
- 90
- 122
2
votes
1 answer
filemtime() not working in Windows PHP-CLI
I just got PHP-CLI working on my Windows machine so I could create scripts using PHP. However, I'm trying to write a script to cleanup my Firefox downloads folder of files older than X number of days, but I can't seem to get the filemtime()…

PHLAK
- 22,023
- 18
- 49
- 52
2
votes
1 answer
PHP - File download through fread preserving last modification time
The following script (just the relevant part) that let me download a file:
if ($file = fopen($file, 'r'))
{
if(isset($_SERVER['HTTP_RANGE']))
{
fseek($file, $range);
}
while(!feof($file) &&
(!connection_aborted())…

dop3
- 391
- 1
- 14
1
vote
2 answers
How do you get last modified dates of all files within a folder and compare it to a certain date? php
Does anyone know a way to grab the last modified dates of all files within a folder and compare it to a certain date?
So far I have this.

user1026866
- 21
- 4
1
vote
3 answers
Find files modified within one hour in HP-UX
I'm searching through the manual page for find I can't see a way to run a command which will find all files modified within an hour. I can see only a way to do it for days.

Vladimir
- 417
- 5
- 20