News for hackers. Stuff that matters.
Re:Linus on btime: “Let’s wait five years” (2010) by wener on Thursday September 22, 2016 @03:40AM (#12555175)
Maybe it's time ?

btime I mean

Under Linux

    $ stat `which stat`
      File: '/usr/bin/stat'
      Size: 80944           Blocks: 160        IO Block: 4096   regular file
    Device: fd01h/64769d    Inode: 1196257     Links: 1
    Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2016-09-22 15:30:03.759501920 +0800
    Modify: 2016-02-18 21:37:47.000000000 +0800
    Change: 2016-09-08 18:17:26.611169858 +0800
     Birth: -
Under OSX

    $ stat `which stat`
      File: '/usr/local/opt/coreutils/libexec/gnubin/stat' -> '../../bin/gstat'
      Size: 15             	Blocks: 8          IO Block: 4096   symbolic link
    Device: 1000004h/16777220d     	Inode: 17293277    Links: 1
    Access: (0755/lrwxr-xr-x)  Uid: (  501/   wener)   Gid: (   80/   admin)
    Access: 2016-01-26 19:01:40.000000000 +0800
    Modify: 2016-01-21 02:56:37.000000000 +0800
    Change: 2016-01-26 19:01:40.000000000 +0800
     Birth: 2016-01-21 02:56:37.000000000 +0800
Re:Linus on btime: “Let’s wait five years” (2010) by pawadu on Thursday September 22, 2016 @04:02AM (#12555280)
So what is the difference between "modify" and "change"??
Re:Linus on btime: “Let’s wait five years” (2010) by Xophmeister on Thursday September 22, 2016 @04:35AM (#12555400)
ctime is when the inode or file changes in terms of stat, ownership, etc. mtime is when the contents of the file is changed.
Re:Linus on btime: “Let’s wait five years” (2010) by XorNot on Thursday September 22, 2016 @04:32AM (#12555387)
Content modification vs. metadata modification I believe.
Re:Linus on btime: “Let’s wait five years” (2010) by yAnonymous on Thursday September 22, 2016 @04:56AM (#12555502)
It's the other way around. ctime (status change) for metadata, mtime (modification) for files contents, atime (access) for file access.
Re:Linus on btime: “Let’s wait five years” (2010) by merraksh on Thursday September 22, 2016 @06:32AM (#12555840)
Part of the confusion for {c,m}time probably comes from

  [c]time: [c]hange       [m]etadata
  [m]time: [m]odify] file [c]ontents
Re:Linus on btime: “Let’s wait five years” (2010) by pawadu on Thursday September 22, 2016 @06:58AM (#12555921)
yeah, that was my first reaction: how do I know which one is which?
Re:Linus on btime: “Let’s wait five years” (2010) by inopinatus on Thursday September 22, 2016 @07:21AM (#12556011)
well, if you need to check in future, like this:

    $ man 2 stat
Re:Linus on btime: “Let’s wait five years” (2010) by guessmyname on Thursday September 22, 2016 @08:53AM (#12556447)
Off Topic — Which one is better?

    $ stat `which stat`
    $ stat $(which stat)
Re:Linus on btime: “Let’s wait five years” (2010) by hmpc on Thursday September 22, 2016 @09:04AM (#12556511)
Backticks are discouraged for any new scripts, since they complicate nesting, quoting, and escaping, besides being graphically less explicit. See also http://mywiki.wooledge.org/BashFAQ/082. The Open Group also discourages backticks: http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_....
Re:Linus on btime: “Let’s wait five years” (2010) by __michaelg on Thursday September 22, 2016 @09:11AM (#12556556)

    $ stat "$(which stat)"

shellcheck or its online version http://www.shellcheck.net/ help a lot
Re:Linus on btime: “Let’s wait five years” (2010) by striking on Thursday September 22, 2016 @08:57AM (#12556472)
Backticks if lazy, parenthetical for complicated command lines.
Re:Linus on btime: “Let’s wait five years” (2010) by andrewSC on Thursday September 22, 2016 @09:11AM (#12556551)
Haha, I read that as "...complicated command times."
Re:Linus on btime: “Let’s wait five years” (2010) by striking on Thursday September 22, 2016 @09:17AM (#12556593)
Close enough!
Re:Linus on btime: “Let’s wait five years” (2010) by aelleth on Thursday September 22, 2016 @09:23AM (#12556627)
$(...) doesn't trip Shellcheck and is slightly more readable and less error-prone in complex statements, e.g. if you have to nest commands.
Re:Linus on btime: “Let’s wait five years” (2010) by rascul on Thursday September 22, 2016 @09:47AM (#12556764)
which probably isn't the best tool to use here.

http://unix.stackexchange.com/questions/85249/why-not-use-wh...

Re:Linus on btime: “Let’s wait five years” (2010) by pimlottc on Thursday September 22, 2016 @11:51AM (#12557702)
I was about to ask how you got that pretty-print output from OSX's `stat` before I noticed you were using `gstat`. Oddly enough, the native `stat -x` gives a similar output but omits birth time:

    $ stat -x `which stat`
      File: "/usr/bin/stat"
      Size: 27376        FileType: Regular File
      Mode: (0755/-rwxr-xr-x)         Uid: (    0/    root)  Gid: (    0/   wheel)
    Device: 1,4   Inode: 192606219    Links: 1
    Access: Thu Sep 22 11:50:55 2016
    Modify: Fri Jul  8 23:03:34 2016
    Change: Sun Jul 31 21:44:22 2016
Re:Linus on btime: “Let’s wait five years” (2010) by pawadu on Thursday September 22, 2016 @04:00AM (#12555274)
> Let's wait five years and see if there is actually any consensus on it being needed and used at all, rather than rush into something just because "we can".

This is why every project maintainer dreams of being Linus...

Re:Linus on btime: “Let’s wait five years” (2010) by buserror on Thursday September 22, 2016 @05:46AM (#12555690)
Well it IS pretty useful; that's why most of my documents start with a date part like "160822 Something Something"; they'll still be sorted by /creation time/ next time I make a change.

Also very useful for photographs for example, when you can edit the EXIF without the whole lot becoming randomly sorted.

Re:Linus on btime: “Let’s wait five years” (2010) by forgetfullest on Thursday September 22, 2016 @09:54AM (#12556807)
Once you go YYYY-MM-DD_HH-MM-SS for photographs, you'll never go back (having the exact millisecond would be neat though)
Re:Linus on btime: “Let’s wait five years” (2010) by CaptSpify on Thursday September 22, 2016 @10:34AM (#12557028)
s/photographs/your documents/g
Re:Linus on btime: “Let’s wait five years” (2010) by kalleboo on Thursday September 22, 2016 @06:04AM (#12555740)
Yeah, I use creation time all the time on OS X. Meanwhile I can't imagine what access time would be used for.
Re:Linus on btime: “Let’s wait five years” (2010) by 0x0 on Thursday September 22, 2016 @06:40AM (#12555863)
atime is heavily used by traditional mail clients like mutt, to determine which mailboxes have new mail: If atime < mtime, then there has been a write to a file since the last read.

Because updating atime on every file access carries an IO overhead, there's a mount option "relatime" that only updates atime if atime < mtime. This preserves the "new mail" feature of mutt, but doesn't require atime writes for every file read operation, which is a decent compromise.

Re:Linus on btime: “Let’s wait five years” (2010) by c3833174 on Thursday September 22, 2016 @07:56AM (#12556178)
relatime has also been the default on Linux for many years.
Re:Linus on btime: “Let’s wait five years” (2010) by swiley on Thursday September 22, 2016 @07:08AM (#12555960)
I've been wanting to write a program that checks atime on stuff like music and then looks for bitcoin addresses to send micropayments to (so you get something like a generalised peer to peer Spotify). I've started a couple times but kept throwing it out, all my FSs that support it are still mounted with atime. I guess I've never knowingly used it for anything else though.
Re:Linus on btime: “Let’s wait five years” (2010) by Xophmeister on Thursday September 22, 2016 @06:19AM (#12555780)
We use atime at work as a proxy for "does this file really need to exist?" on our cluster's scratch disks.
Re:Linus on btime: “Let’s wait five years” (2010) by joelthelion on Thursday September 22, 2016 @07:25AM (#12556025)
> This is why every project maintainer dreams of being Linus...

Most people who try do it poorly though. You have to be super smart to reject unneeded stuff while still allowing useful features to go through.

Re:Linus on btime: “Let’s wait five years” (2010) by okwhatthe2 on Thursday September 22, 2016 @09:13AM (#12556571)
No you don't, you just have to fight for it.
Re:Linus on btime: “Let’s wait five years” (2010) by simonh on Thursday September 22, 2016 @10:18AM (#12556931)
Fighting hard isn't en end in itself. We'd have idiots fighting to the bitter end for cruft they happen to be personally invested in. It's really about taking responsibility for all the consequences of your decisions seriously.
Re:Linus on btime: “Let’s wait five years” (2010) by okwhatthe2 on Friday September 23, 2016 @09:01AM (#12564221)
Idiots fighting to the bitter end is a large part of what molds society today, unless I have severely missed something. Please educate me if I have.

I'm not sure "it's" really about taking responsibility for all the consequences of your decisions seriously, as much as it is creating the space and mechanisms for your ideas to come to fruition. We cannot "see" the consequences of our actions, but we can create systems that stabilize the world. Perhaps this is what you're talking about?

Re:Linus on btime: “Let’s wait five years” (2010) by golanggeek on Thursday September 22, 2016 @05:48AM (#12555695)
Really true.. People do many things, because they can
Re:Linus on btime: “Let’s wait five years” (2010) by CyberShadow on Thursday September 22, 2016 @09:34AM (#12556687)
Ext4, BTRFS, ZFS, NTFS, HFS+, UFS2 all track creation time. Kernel support is past due.
Re:Linus on btime: “Let’s wait five years” (2010) by unwind on Thursday September 22, 2016 @05:39AM (#12555664)
Mods: the title could do with some editing, like making it "wait for", and a space before the year. Thanks.
Re:Linus on btime: “Let’s wait five years” (2010) by OJFord on Thursday September 22, 2016 @08:16AM (#12556254)
I agree, it's completely confusing, and even grammatical not.

    > For `btime`, Linus told us to "wait five years"
Would be my suggestion. Or perhaps:

    > Linus told us "wait five years" for `btime`
Re:Linus on btime: “Let’s wait five years” (2010) by caf on Thursday September 22, 2016 @07:05AM (#12555950)
Re:Linus on btime: “Let’s wait five years” (2010) by PercussusVII on Thursday September 22, 2016 @06:02AM (#12555733)
Christ its almost impossible to read that page
Re:Linus on btime: “Let’s wait five years” (2010) by vog on Thursday September 22, 2016 @09:26AM (#12556639)
Care to elaborate? I didn't have any issues reading that page. Moreover, I don't have any clue what could make it hard to read for others.
Re:Linus on btime: “Let’s wait five years” (2010) by CyberShadow on Thursday September 22, 2016 @09:31AM (#12556665)
The link has been changed by a moderator. I don't know what the original link was, though.
Re:Linus on btime: “Let’s wait five years” (2010) by tronje on Thursday September 22, 2016 @10:46AM (#12557125)
Re:Linus on btime: “Let’s wait five years” (2010) by vog on Friday September 23, 2016 @10:50AM (#12565015)
Good to know. However, I still don't see what grand-grand-grand-parent was complaining about.