-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Show system birthday #37
Comments
Sounds like something fun to add, I'll add it to my TODO list. |
What does this command output? If the command above doesn't work then I'm not sure about how we can get |
System birthday like time when it was installed? I am getting "Oct 11 00:01" but thats not even close to my OS X birthday. 😄 |
Yup! I can't seem to get the correct value without root privileges which means that this feature won't be coming any time soon. |
After some digging in system logs here in OS X (should I stop saying OS X, because I think that you already found out that its my system 😄 ), I found that Oct 11 is pretty accurate actually. Found out I made clean install off OS X on Oct 10! But year is still missing in your command (and you can't just grep it from |
What does this command output? This is the same as above but it'll print more info. ls -alct / | tail -1 |
|
Ah, we still don't get the year. |
I can't seem to find any other way of getting the birthday without requiring root. |
Actually, you can. Your
So yeah, running |
Oh neat! Ok, it turns out that the flag is different on linux. It's |
Another option would be getting the birthday in an OS-specific manner. For example, on Arch you can get the OS birthday by reading the first line in head -n 1 /var/log/pacman.log | tr -d '[]' | awk '{print $1, $2}' Prints: A similar command can be used on Ubuntu based OS's. |
The simpler we can get the function to be the better, does |
Yeah, it works. A better variant is this: ls -alct --full-time / | tail -1 | awk '{print $6}' |
Oh ok, if command here is different and you have to "if" them for different distros, please use this one for OS X then: |
Yes, CDIS.custom is always here. Even in cases where installer fails and even in older OS X versions. |
Awesome! |
I'll also add a config option to convert the output to a prettier format. So |
Didn't specified; the above command yields An even better one would be ls -alct --full-time / | tail -1 | tr ':' ' ' | awk '{print $6, $7 ":" $8}' That shows |
The Birthday: 1970-01-01 10:00 |
Try this: ls -alct --full-time / | grep "lost+found" |
This works, awesome! |
I pushed a version for you guys to test to master. The birthday line is disabled by default and can be enabled with What does the output look like? |
Fine with me. View post on imgur.com <script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
|
The font is the GTK theme font. |
I'll add this too! |
What the hell that's too small. |
It takes a while to get used to it. :) |
I will end this off-topic discussion by saying my font's called erusfont. Sorry for spamming, watchers and issue contributors. |
May I close this issue? |
I'm about to push the finished function, lets leave this open until you guys test it out. |
I just pushed it to master. There are two new flags/options:
If it works, we can close the issue! |
In my case it works. Does it work on Windows? |
I'm testing BSD at the moment and it doesn't work. I'll check Windows now. |
OS X: not working, its blank except if I use --birthday_shorthand flag. |
Can I see the shorthand output? |
|
What's the output of |
Ugh, something is different. Again.
|
This is the error I was looking for! :) |
Look in This is what it is on linux: -d, --date=STRING
display time described by STRING, not 'now' |
Check this out. https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/date.1.html |
Thanks |
What about this command?
|
Nope :/ |
What about this?
|
It says illegal time format. This |
Awesome, we just need to use the right time format now! |
Also BSD and OS X share the same date flags, so I'm booting up a virtual machine to test. |
I've figured it out! :) I'll push it to master in a sec. |
Works like charm now. Except --birthday_time flag does nothing. |
Weird, I'll see if I can reproduce this. |
Oh sorry, my bad. Works in all combinations! You can close this now. |
Awesome! The function still doesn't work with BSD and Windows but I can work on this locally. |
fix pre-install-source hook
On Linux it's easy: you can read the day when
/lost+found
was created.The text was updated successfully, but these errors were encountered: