Questions tagged [filemtime]

File Modification Time, also known as mtime. On a UNIX filesystem, concepts similar to mtime include atime (access time) and ctime (metadata change time).

143 questions
1
vote
3 answers

Transferring creation date from one file to another

I have been trying without success to transfer the creation date from one file to another on OS X 10.8 (Mountain Lion) using Bash. It’s probably some combination of stat and touch but I haven’t quite figured it out, because the format used by stat…
Jax
  • 13
  • 2
1
vote
2 answers

change mtime on git pull

Does anybody know way to change mtime to repo commit time (or any other, but depends on commit metadata) for added/updated files? We have some logic, which tests files mtime, but backend servers have different mtime on files which were changed,…
Alexandr Shurigin
  • 3,921
  • 1
  • 13
  • 25
1
vote
2 answers

Symfony 2 | OPcache | Warning: filemtime(): stat failed for Acme-DemoBundle-Controller-SecuredController.cache.php in FileCacheReader.php

I have installed Symfony 2 and I have activated the opcache (ZendOPtimizer) extension and when I intent to generate the cache of a web page O've got this error : Warning: filemtime(): stat failed for…
psylo66
  • 608
  • 11
  • 26
1
vote
1 answer

Sort function works wrong with filemtime PHP

I'm trying to sort files by modification date using PHP. I'm using filemtime function then sort function using the following code:
Fayed
  • 13
  • 3
1
vote
1 answer

File modification times reverting after change with os.utime in python

I've came across a problem in python 2.7.1 (running on Mac OS X 10.7.5) with the os.utime command I'm trying to develop a script that downloads files from an FTP that match certain criteria but if the file exists and I already have a copy of it on a…
JAC
  • 33
  • 2
  • 4
1
vote
1 answer

find and mtime operation excluding folder mtime

Hi there I have a backup shell script executed through crontab but I have a rather large problem. This is the particular line that scans my drive: find $E -mtime -1 -exec cp -r --parents {} $B/$T \; where E and B are variables holding directory…
Chrayfish
  • 157
  • 2
  • 11
1
vote
0 answers

Preserve mtime with svn checkout, or update svn export

I want to publish a copy of an svn checkout on a web-server, which has to be svn up'ed daily. I'd like to preserve the mtime of files (and directories, if possible) of such a checked out copy of an svn repository. I found that svn export would…
cnst
  • 25,870
  • 6
  • 90
  • 122
1
vote
1 answer

How-to watch mtime changes in course of php script?

I'm trying to watch for a file being modified in a long running php script. The basic algorithm is this: ... $mtime = filemtime($filename); sleep($delay); if($mtime < filemtime($filename)) ... // do something because file was changed…
zzandy
  • 2,263
  • 1
  • 23
  • 43
1
vote
0 answers

php filemtime sort for msking imagick thumbs

I`m trying to use php filemtime to find latest added images(folder) in album and making thumbs with Imagick. I know that that part of script finding the latest folder actually works, and also works the Imagick part. Putting these two together is the…
dogcat
  • 994
  • 7
  • 10
1
vote
4 answers

How to find out oldest file from a directory??? (PHP)

I have a directory named 'backup' its contains following files (with some specific details) No---File Name----------------------------------------------------------------Date--------------------Time-----------Size 1. …
Frank
  • 2,285
  • 7
  • 43
  • 68
0
votes
3 answers

PHP Warning: filemtime() [function.filemtime]

I've noticed that the directory on which one of the PHP script is installed have very large error_log file almost of 1GB size, mostly the errors are generated by coding on line 478 and 479.. example of the error from error_log file is below: PHP…
0
votes
0 answers

Huge discrepancy between file Mtimes from Rust and NodeJS

I've stumbled across a very unexpected issue, which is that I'm trying to download a file from a NodeJS server from Rust only if the destination file is older than the source. The mtime for the Source file is given by NodeJS using the let mtime =…
J-Cake
  • 1,526
  • 1
  • 15
  • 35
0
votes
1 answer

scandir subfolder gives errors when I try to sort images by filemtime in php (filemtime(): stat failed)

I wrote a php gallery some years ago, all works fine until I put in scandir a subfolder (foto), I have the following structure: root/gallery/ root/gallery/foto/ root/gallery/thumbs/ root/gallery/thumbs_b/ root/gallery/gallery.php in folder foto…
Alessandro
  • 900
  • 12
  • 23
0
votes
3 answers

Delete duplicate file based on modified time, remaining first created file

First I have video files that record from webcam camera. It will got many file of videos but I want to delete duplicate file base on modification time, limited by minutes. For example, I have 3 video files as below. base on (hour : minute :…
Kukkik
  • 101
  • 8
0
votes
0 answers

How to reread info about file (e.g. creation date) in endless loop?

I have an endless loop for websockets and one of the task is to check if the file (whose name came through ws message) is already on the server (message is usualy faster the the fileupload). The filename is still the same, so I wanted to check the…
Láďa
  • 5
  • 4