Live data from Hacker News

“I have [bash] history back to ~2003”

twitter.com

111–120 of 148 posts

Re: “I have [bash] history back to ~2003”

#111
post #17
post #5

This guy is the inverse of me, because I have linked my .bash_history to /dev/null

You could just disable it instead, saves some cpu cycles.

Assuming I am the average Gentoo user, how many CPU hours would I save in a year? I doubt it is worth the time investment.

Re: “I have [bash] history back to ~2003”

#112

I keep a pretty long bash history, but I don't have it unified among machines or anything. Others have mentioned several handy tweaks for doing this, but I didn't see all of the ones I use so I thought I'd share them here. One of the important bits is the HISTIGNORE. I am interested in commands that I might want to search for and run again one day, so I filter out commands I consider to be clutter. # Configure my his…

`cd` can be critical in grepping for how a file in a particular directory was made.

Re: “I have [bash] history back to ~2003”

#113
post #109

Is hostname,pid,date really enough to avoid collisions? If avoiding them is really important, I don't think you have any choice other than to go the whole hog and basically implement half of Maildir.

Date and time to the second. For something I start interactively? Yes, it's good enough.

Re: “I have [bash] history back to ~2003”

#114
post #79

Earlier quoted context omitted.

I'd be quite interested in someone provided this sort of thing as a SaaS-like drop-in to Bash and Zsh if someone wants a fun weekend project..

I've wanted this as well... plus keep track of how long commands took to run and (heck, why not?) output!

this must be some kind of record, in 15 words you took something great, started adding unnecessary, creeping features, and ended up with bloatware no one wants to use anymore :)

Usually this takes years!

Re: “I have [bash] history back to ~2003”

#115

I guess the downside of this is that ctrl+r would only search the current day's history? Personally I at least increased the history kept with HISTFILESIZE=500000 and HISTSIZE=5000

You can still use ctrl+r, but you need to provide the history file in one piece, using "history -r " command. I do it in the following way, maybe it can serve you too:

  cat `find "${HOME}/.history" -type f | grep -v ".allhistory"` > ${HOME}/.history/.allhistory
  history -r ${HOME}/.history/.allhistory

Re: “I have [bash] history back to ~2003”

#116
post #73

$ history | wc -l 56201 I use a simple prompt_command hook to push my history (from all my machines) to a central MySQL database( https://github.com/fredsmith/history-db ). Entries are de-duped and a tally is kept so I can do simple ad-hoc reporting: mysql> select * from history order by count DESC limit 10; +-------+---------------------+-----------+----------+-------+ | id | timestamp | command | hostname | count |…

You owe the GNU coreutils project $392 https://github.com/diafygi/gnu-pricing

> This project is satire and was made during the 2015 Stupid Shit No One Needs & Terrible Ideas Hackathon.

That's good, because it would be extremely disturbing if someone from the FSF/GNU coreutils team thought charging like this was okay.

Re: “I have [bash] history back to ~2003”

#117
post #73

$ history | wc -l 56201 I use a simple prompt_command hook to push my history (from all my machines) to a central MySQL database( https://github.com/fredsmith/history-db ). Entries are de-duped and a tally is kept so I can do simple ad-hoc reporting: mysql> select * from history order by count DESC limit 10; +-------+---------------------+-----------+----------+-------+ | id | timestamp | command | hostname | count |…

You owe the GNU coreutils project $392 https://github.com/diafygi/gnu-pricing

I agree with the general idea that contributing to these projects is good. However, the link is slightly misleading: "GNU programs are used billions of time every day all over the world. However, the intellectual property owners, the Free Software Foundation, don't make a cent from it. What a raw deal! This project aims to fix that by monetizing many popular command line tools that GNU maintains."

Maybe true, but keep in mind that the main coreutils maintainers (including the parent) are funded by Red Hat. There are plenty of FOSS projects that do suffer from a lack of funding; coreutils, GCC, etc are certainly not one of them. As such, if your goal is to help the FOSS community at large, you might want to consider channeling the money to other important projects.

Maybe the donation link already does such channeling; I am curious about this.

Re: “I have [bash] history back to ~2003”

#118
post #105
post #96

Earlier quoted context omitted.

What leads you to believe OP doesn't use FreeBSD or any other Unixalike? :)

I mostly do (MacOS), but: $ which ls /usr/local/opt/coreutils/libexec/gnubin/ls I'd say $392 seems like less than I should contribute.

Well, if it's shipped from Apple as part of their OS (I'm not sure it is from your path), then Apple would be responsible for licensing it.

Which makes me wonder, does Apple have an official stance on supporting open source they use?

Re: “I have [bash] history back to ~2003”

#119
post #109

Is hostname,pid,date really enough to avoid collisions? If avoiding them is really important, I don't think you have any choice other than to go the whole hog and basically implement half of Maildir.

Well if it includes seconds, the likely hood of me typing something on a machine, switching to another and running something with the same pid within a second, is pretty low.

Mostly because I can't switch to another machine within 1s

Post reply on HN