Display of file modification time on NFS file system

Source: Internet
Author: User
The file modification time on the NFS file system displays the problem of Solaris + NetApp storage. the user's home directory is placed on NetApp and mounted to the local through autofs. You can use ls-l to view the touch file in your home directory. the mtime (modifytime) column only displays the year, month, and day ,... the file modification time on the NFS file system displays the problem of Solaris + NetApp storage. the user's home directory is placed on NetApp and mounted to the local through autofs. You can use ls-l to view the touch file in your home directory. the mtime (modify time) column only displays the year, month, and day, but not the time. $ Touch file $ ls-l file-rw-r -- 1 user 0 Aug 25 2009 file after waiting for more than ten minutes, check it again by ls, however, the displayed time is not the time for the original touch execution, but a 10-minute delay. $ Ls-l file-rw-r -- 1 user 0 Aug 25 file on the Solaris 10 system, re-touch the file, and immediately use the ls-e (-e option to display the time to seconds) to view the time, minute, and second information of the file mtime, you can see that the specific mtime is displayed. $ Touch file $ ls-e file-rw-r -- 1 user 0 Aug 25 13:24:09 2009 file then use date to check the local time $ dateTue Aug 25 13:09:22 CST 2009 the mtime of the file is 10 minutes earlier than the local time, in the second step of the previous test, the time difference is exactly 10 minutes. Therefore, it is determined that the time on the NetApp storage is not synchronized with the time on the Solaris system, resulting in this problem. After the conclusion is obtained, a test was conducted to find that as long as the NetApp time is earlier than the local time, the time-based information cannot be displayed after the touch ls-l view; if the time of NetApp is later than the local time, the time point information can be displayed. However, the time point information displayed is not the local touch time, but the time on NetApp. Therefore, the display time of files and directories in the NFS file system is based on the time of the NFS host, and when the NFS host time is earlier than the local host time, after a file is created, the time-based information cannot be displayed immediately. To avoid this problem, we should try to synchronize the time between the NFS host and the local host. For more information about how to set the time synchronization, see http://www.2cto.com/os/201307/231894.html However, I cannot figure it out. Since ls-l is not allowed to display the mtime earlier than the local time, why does the ls-e option in Solaris 10 enable it to be displayed? The-e option described in man ls is only as follows: the same as-l, cannot T displays time to The second, and with one format for all files regardless of age: mmm dd hh: mm: ss yyyy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.