Why du and stat are showing different mtime?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Why du and stat are showing different mtime?
# 1  
Old 04-08-2013
Why du and stat are showing different mtime?

Code:
[usr027@psr5651 /opt]$ stat qt_tdata_025/dblogs
  File: `qt_tdata_025/dblogs'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 1ch/28d Inode: 2017        Links: 15
Access: (0775/drwxrwxr-x)  Uid: (31659/ prod)   Gid: ( 4843/ycef)
Access: 2013-04-08 12:49:44.102212000 -0400
Modify: 2011-12-22 07:24:13.681888000 -0500
Change: 2012-06-07 21:45:52.135679000 -0400

[usr027@psr5651 /opt]$ du -hs --time  qt_tdata_025/dblogs
55G     2013-04-05 22:35        qt_tdata_025/dblogs

# 2  
Old 04-08-2013
Did you consult your man page? GNU du's --time option does not necessarily return the mtime of the command line argument.

Regards,
Alister
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mtime issue

Dear all, i am trying to find all files created one day before, for example 26 October, and i am using this command: find . -type f -daystart -mtime 1 This command in fact lists all files created on 26 October, but the files between midnight 00:00 26 Oct and 01:00 26 Oct, does not shown... (4 Replies)
Discussion started by: arrals_vl
4 Replies

2. Shell Programming and Scripting

Find by name and mtime

Hi, I'm trying to find all files that have a .ksh and .p extension and that are 7 days old by using the below find command but it doesn't seem to as expected. It gives me random results.. Can someone point out what may be wrong? find . -name "*.ksh" -o -name "*.p" -mtime -7 (2 Replies)
Discussion started by: Jazmania
2 Replies

3. UNIX for Dummies Questions & Answers

rsync and mtime

Hi, I'm sure this will be covered here already somewhere, but a search didn't throw up anything. I'm trying to work out the extra bits needed in this command for this rsync so that it only copies files less than 7 days old: rsync me@host:/logs/* . I'm sure it just needs the mtime -7... (2 Replies)
Discussion started by: dlam
2 Replies

4. UNIX for Dummies Questions & Answers

(find) mtime vs. (unix) mtime

Hi I've made some test with perl script to learn more about mtime... So, my question is : Why the mtime from findfind /usr/local/sbin -ctime -1 -mtime -1 \( -name "*.log" -o -name "*.gz" \) -print are not the same as mtime from unix/linux in ls -ltr or in stat() function in perl : stat -... (2 Replies)
Discussion started by: hiddenshadow
2 Replies

5. Shell Programming and Scripting

mtime

Hi, I've some files of some past days and everyday some new files are also getting added to the same. Now how can i use mtime to get the files of the current date i.e if i want the files of 25th feb 2009 and if im finding the files on 25th 12:10 am then i should only get the files after... (4 Replies)
Discussion started by: ss_ss
4 Replies

6. UNIX for Dummies Questions & Answers

-mtime +30

Hello, Can someone help me to understand the following: find /test/rman/ -mtime +30 -exec rm '{}' \; What does -mtime +30 mean? Thanks! (1 Reply)
Discussion started by: Blue68
1 Replies

7. Shell Programming and Scripting

problem in mtime

Hey champs, i am using the following commands to search 1day files available under a dir by shell script. find <dirname> -type f -mtime +1 sometimes it used to show me correct results.....but sometimes it's not ??? if the above one not working perfect i.e. not showing me the exact... (2 Replies)
Discussion started by: manas_ranjan
2 Replies

8. Shell Programming and Scripting

mtime

hi, :) consider the following statement find . -type f -mtime -1 -print here what is the use of -1 option. any help? cheers RRK (7 Replies)
Discussion started by: ravi raj kumar
7 Replies

9. UNIX for Dummies Questions & Answers

mtime help!!!!!

thank you for the help. (2 Replies)
Discussion started by: scooter17
2 Replies

10. UNIX for Dummies Questions & Answers

find . -mtime

...what am i doing wrong?? I need to find all files older than 30 days and delete but I can't get it to pull details for ANY + times. The file below has a time stamp which is older than 1 day, however if I try and select it using any of the -time flags it just doesn't see it. (the same thing... (1 Reply)
Discussion started by: topcat8
1 Replies
Login or Register to Ask a Question