Live data from Hacker News

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

twitter.com

131–140 of 148 posts

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

#131

Earlier quoted context omitted.

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 kee…

woosh! The sound of sarcasm going over your head.

This project is entirely satirical. Read through to the bottom of the README.

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

#132
post #44

Earlier quoted context omitted.

We have common mistakes list http://www.webminal.org/common_mistakes/ but didn't figure-out something like which is the least-used valid command. Good idea, we will dig deeper into their bash_history :)

I think ".." was "cd .." in dos

I have ".." as an alias for "cd .."

I also have "la" as an alias for "ls -a", and "lsa" as an alias for "ls -lah --color=auto"

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

#134

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…

who actually types pwd? I've had it in my prompt since I learned about PS1.

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

#135
post #130

Earlier quoted context omitted.

It's a joke

It's a joke that's very much not obviously a joke. This is social commentary about the state of free software and/or Hacker News, I'm just not sure what the social commentary actually is.

Seemed pretty obvious to me.

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

#136
post #101

If you're going to store a lot of history, you might want something nicer than the standard ctrl-r to search it with. [fzf] is ctrl-r on steroids. [fzf]: https://github.com/junegunn/fzf It's a fuzzy pattern matcher for your shell history (and lots more).

fzf is cool, but I am used to

ctrl-r (find something) enter (execute) ctrl-r (find something I have to change) home/end (change, then enter)

with fzf ctrl-r and selecting always gives me just a string where I then have to press enter, it just behaves like dmenu for the console basically if you look at the bash bindings, which unfortunately is a bit less flexible unless I am missing some option that would allow this

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

#137

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…

who actually types pwd? I've had it in my prompt since I learned about PS1.

I use `pwd -P` sometimes.

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

#138
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

It includes hostname too. You can only get a collision if you do all of the following within one second:

1. Start an interactive shell. 2. Enter a command you want saved. 3. Exit this shell. 4. Start another shell. 5. Be unlucky such that the new shell has the same PID as the previous one.

This is not something to worry about.

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

#139
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 |…

  $ history |wc -l
  82230
This is just from my work machine (~4 years old), my history is not centralized but after seeing all this I think I'm going to work it into my centralized dotfiles system.

Also, I can confirm that gigantic bash histories don't affect the speed of anything.

Super useful/essential tweaks -

  export HISTCONTROL=erasedups
  export HISTSIZE="NOTHING"
  export HISTFILESIZE="NOTHING"`
  shopt -s histappend
  export PROMPT_COMMAND='history -a;echo'
erasedups will erase any earlier instance of an indentical command, keeping your history file lean. Setting HISTSIZE and HISTFILESIZE to something nonnumeric makes for no limits. histappend appends to the HISTFILE when the shell session exits. And my prompt command appends each executed command to HISTFILE immediately after it's executed. With histappend, this may be redundant. (The prompt command also gives me a blank line after each command finishes.)

That mysql setup is pretty cool too, it's a rich man's

  $ history | awk '{print $2}' | sort | uniq -c | sort -rn | head -10
  14365 vi
  11006 sudo
   6976 ls
   6898 svn
   5322 cd
   3869 cdb
   2809 svnvimdiff
   1846 ggrep
   1474 git
   1285 ssh

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

#140

Earlier quoted context omitted.

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.

The 'announcement' for this feature is great for the ridiculous fake quotes. e.g.

"We've scaled enough. It's time to monetize." -Richard Stallman, Founder. FSF.

https://diafygi.github.io/gnu-pricing/website/

Post reply on HN