Questions tagged [mtime]

11 questions
18
votes
1 answer

Does directory mtime always change when a new file is created inside?

Is it always true that when a new file is created in a directory - the directory's mtime changes?
kolypto
  • 10,738
  • 12
  • 51
  • 66
7
votes
4 answers

Why does "find -mtime" not work as expected on files with different timezones?

I have some files on a server with the date several months ago, but they are invisible to find -mtime 7 search. When I list them with ls -l, they look perfectly normal: -rw-r--r-- 1 root root 347253 Jun 12 16:26…
Vladislav Rastrusny
  • 2,581
  • 12
  • 39
  • 56
3
votes
1 answer

How to list every file that is written to, on Linux?

What is the best way of getting a list of all files which have been written to, since power on? Is a simple find (with mtime) best for this, or are there other ways? (find won't list files which are written to, then deleted.) I'm using Ubuntu Linux…
fadedbee
  • 1,988
  • 4
  • 22
  • 33
2
votes
2 answers

Invalid argument when running 'find' command with -exec and -mtime

Pretty wierd error message came up on Centos. I tried to run this command: find /tmp/something -type f -mtime +2h -exec cp '{}' /tmp/target \; And the error I've got: find: invalid argument `-exec' to `-mtime' Can the 'find' be different on other…
t.fazakas
  • 61
  • 1
  • 1
  • 6
2
votes
2 answers

watchdog daemon file change interval?

I'm trying to setup the watchdog daemon to run on my Fedora 12 system. I know exactly what I want it to do ... but I'm unsure as to exactly configure it. Mainly due to inexact documentation. What I want to do is have my system reboot if a specific…
David G
  • 205
  • 1
  • 11
1
vote
2 answers

Using find to locate files modified in Aug

I need to find files modified in August. Here's my portion of the command that narrows down the modification time. This works, but it seems to be missing some files. I'm guessing this is missing files modified in a given hour or hour(s) because…
Ben
  • 3,630
  • 17
  • 62
  • 93
0
votes
1 answer

gsutil "Copying mtime from src to dst" having moved source files?

I use gsutil to backup photos from a dedicated box to google nearline storage. Recently I moved all of my photos from that dedicated box to a new dedicated box. I made sure to use the relevant archival rsync flags to avoid changing the files…
Codemonkey
  • 1,034
  • 2
  • 17
  • 36
0
votes
1 answer

Linux find and -mtime usage

I have two different linux based systems where the find command doesn't seem to be working as expected. I have a directory. In it I run... ls -l and the system returns... drwxr-xr-x 2 panopticon36 panopticon36 4096 May 22 12:28 folder1 drwxr-xr-x 2…
0
votes
1 answer

find directories in the current directory, older than 5 days and archive them

This is basic questions. I need to find folders in the current working directory(not recursively) and if they are older than 5 days archive them. zip or tar.gz is fine. I can find the folders with following commands find ./ -maxdepth 1 -type d…
Abdul
  • 85
  • 1
  • 2
  • 9
0
votes
0 answers

mtime vs msec producing different result

I've setup a little cron to compress log files of my application. Generally I need todays logs, so I can compress everything that is one day old or older. Why do the two following commands behave different? mtime is not finding anything at all,…
dognose
  • 164
  • 10
0
votes
0 answers

Change file name in linux is is change in mtime or ctime

I created a file called as test.war. If I change it to test.war.backup by copying and renaming via cp command, is this change in mtime or ctime? What about for rename mv command, is it ctime or mtime
guest
  • 1
  • 1