Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick
brad

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
Subscribe

  • Ukraine

    Nobody reads my LiveJournal anymore, but thank you to everybody in Russia protesting Putin's insane war against Ukraine. (I know it's risky…

  • Happy Birthday!

    Happy 20th Birthday, LiveJournal! 🐐🎂🎉

  • hi

    Posting from the iPhone app. Maybe I'm unblocked now.

  • Post a new comment

    Error

    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.
  • 0 comments