find(1) even has -mmin. However I wanted to use test(1).
Dan Jacobson [EMAIL PROTECTED] writes:
find(1) even has -mmin. However I wanted to use test(1).
test `stat -c %Y $file` -gt `date +%s`
--
ilmari
G If you realy, realy, realy need to do this /proc/self would be much
G better since you don't have rights for the inits proc entry in a
G chroot.
But that is not now:
$ stat -c %y /proc/self /proc/1;LC_ALL=C date
2003-08-18 06:10:52.0 +0800
2003-08-18 06:21:24.0 +0800
Mon Aug 18
Dan Jacobson [EMAIL PROTECTED] writes:
T Why would you need to do that?
I want to do
$ test file1 -nt filenow
to see if the mtime of file1 is in the future or not, in a simple
shell script.
RTFM.
TESTS
Numeric arguments can be specified as
+n for greater than n,
On Mon, 2003-08-18 at 11:08, Dagfinn Ilmari Mannsåker wrote:
RTFM.
TESTS
Numeric arguments can be specified as
+n for greater than n,
-n for less than n,
^^
n for exactly n.
[...]
-mtime n
Please respect the debian mailing list policy (and my
Mail-(Copies|Followup)-To headers) and don't copy me on replies.
Herbert Valerio Riedel [EMAIL PROTECTED] writes:
while at it... how would one go for searching files, that are at least,
say 10 hours in the future? =)
..as 'find -mtime
I could do
$ touch file
to make a file with the current time as its mtime,
but I think one already exits. Is /proc/1 the best choice?
On Sun, Aug 17, 2003 at 11:05:45AM +0800, Dan Jacobson wrote:
I could do
$ touch file
to make a file with the current time as its mtime,
but I think one already exits. Is /proc/1 the best choice?
Why would you need to do that?
--
:(){ :|:};:
Dan Jacobson [EMAIL PROTECTED] writes:
I could do
$ touch file
to make a file with the current time as its mtime,
but I think one already exits. Is /proc/1 the best choice?
If you realy, realy, realy need to do this /proc/self would be much
better since you don't have rights for the inits
9 matches
Mail list logo