Hey everyone,
I'm trying to pull a file's creation timestamp so that I can do a compare with the current system date. So far I can do this:
ls -l filename >| file.out
file.out contains a line like this:
-rw-r--r-- 1 root user 0 Oct 31 13:34 test1_103105.log
So I'm trying to pull the Oct 31 13:34 portion but I'm having trouble finding a function that will let me substring from "O" to "4". Does anyone know of one? Also, how would I actually do the compare of this substring with the system time? Is there anything similar to a datediff function available?
Thanks for the help,
Jisoo23
I'm trying to pull a file's creation timestamp so that I can do a compare with the current system date. So far I can do this:
ls -l filename >| file.out
file.out contains a line like this:
-rw-r--r-- 1 root user 0 Oct 31 13:34 test1_103105.log
So I'm trying to pull the Oct 31 13:34 portion but I'm having trouble finding a function that will let me substring from "O" to "4". Does anyone know of one? Also, how would I actually do the compare of this substring with the system time? Is there anything similar to a datediff function available?
Thanks for the help,
Jisoo23