Redian新闻
>
shell: how do I check if a file is updated?
avatar
shell: how do I check if a file is updated?# Unix - 噫吁兮,危乎高哉
f*y
1
for example how do I know if a file has
been updated since midnight last night? thanks.
avatar
D*e
2
stat filename

【在 f***y 的大作中提到】
: for example how do I know if a file has
: been updated since midnight last night? thanks.

avatar
f*y
3
it works on linux.. but looks not working on my unix account
have any idea about this?

【在 D**e 的大作中提到】
: stat filename
avatar
D*e
4
stat() is a system call. in linux it is put in a c wrapper and made an
executable. this is not done in unix. if you just want to check the time stamp
on a file, i think this can be done by playing with 'ls' or 'find', etc. of
cause you can write a little program that calls stat(). do a 'man stat' on the
usage.

【在 f***y 的大作中提到】
: it works on linux.. but looks not working on my unix account
: have any idea about this?

avatar
c*t
5

If you install perl, try perldoc File::stat.

【在 f***y 的大作中提到】
: for example how do I know if a file has
: been updated since midnight last night? thanks.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。