Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

lutimes(2) and Linux

This homeboy is sad that lutimes(2) isn't implemented in Linux.

I didn't even know of lutimes earlier today, because I didn't even know of utime()/utimes(). I was like, "How can I get brackup to restore modtimes? I know tar and rsync do it." So I straced tar, found utime/utimes, was happy, implemented, then found it didn't work on symlinks (or rather, it tried to follow symlinks). Told Whitaker about lstat (vs stat), then he googled lutimes, found it, told me, and I find that Linux
doesn't implement it.

And that was after I straced tar on symlinks and found it didn't do anything, so I had little hope anyway.

But this breaks my brackup test suite which compares the output of "ls -lR" on backup dir and restored dir. So now I have to compare instead some new serialization of the before/after directories, ignoring symlink modtimes. Lame. I thought I was done.

Oh yeah, work on Brackup continues. It restores now. Coming soon to svn and CPAN near you.
Tags: linux, tech

  • Speakeasy pricing confusion

    Speakeasy peeps, Am I over-paying? (I'm assuming yes.) I currently have: DSL: Home Plus OneLink ADSL 6.0/768 Pro-Install (C) (activated…

  • Moscow evening plans

    Muscovites, any recommendations on what I should do tonight in your fair city? SMS might be best, since I'll be leaving work soon probably. +7 (915)…

  • Amazon default shipping option

    Any Amazon employees read this blog? Please to be filing internal bug report, k thx: * users should be able to set their default shipping…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.