I don't really know awk, but my attempt so far  history | awk '!x[&lt;everything except first column which is the order&gt;]++' | sort -r
I really enjoying using control+r to recursively search my command history. I've found a few good options I like to use with it: # ignore duplicate commands, ignore commands starting with a space export HISTCONTROL=erasedups:ignorespace  # keep the last 5000 entries export HISTSIZE=5000  # append to the history instead of overwriting (good for multiple connections) shopt -s histappend  The only problem for me is that erasedups only erases sequential duplicates - so that with this string of commands: ls cd ~ ls  The ls command will actually be recorded twice. I've thought about periodically running w/ cron: cat .bash_history | sort | uniq &gt; temp.txt mv temp.txt .bash_history  This would achieve removing the duplicates, but unfortunately the order would not be preserved. If I don't sort the file first I don't believe uniq can work properly. How can I remove duplicates in my .bash_history, preserving order? Extra Credit: Are there any problems with overwriting the .bash_history file via a script? For example, if you remove an apache log file I think you need to send a nohup / reset signal with kill to have it flush it's connection to the file. If that is the case with the .bash_history file, perhaps I could somehow use ps to check and make sure there are no connected sessions before the filtering script is run?
How can I restore configuration files? I would like to restore LightDM to its default state, because for some reason /etc/lightdm/unity-greeter.conf is now an empty file.  Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-get install --reinstall unity-greeter doesn't create a new config file as you might expect.   How can I restore a missing config file? How do I disable the volume control overlay? When changing the volume on a Mac, you get a big ugly gray bezel showing the change in volume. This is super annoying when (say) watching a movie. Is there any way to disable this? Prove by induction. How do I prove $\sum\limits_{i=0}^n2^i=2^{n+1}-1$ with induction? $\displaystyle\sum_{i=0}^n2^i=2^{n+1}-1$.  I don't understand induction so I could use some help. A Particular Two-Variable System in a Group Suppose $a$ and $b$ are elements of a group $G$. If $a^{-1}b^{2}a=b^{3}$ and $b^{-1}a^{2}b=a^{3}$, prove $a=e=b$.   I've been trying to prove but still inconclusive. Please prove to me.  Thanks very much for proof. Why do function pointers all have the same value? I just renewed my antivirus (Kaspersky's) yesterday. After that, I logged onto Chemistry.SE (which I frequent often) but then I was greeted with this  Which was definitely not how it looked like earlier that morning. I wasn't able to  Open the reputation and badges tab Vote on questions, answers and comments (even answers to MY questions) Comment on questions or answers. 'Favorite' a question Attach tags to a question Post questions  etc., etc. But when I logged on to the Physics and Biology SEs (which I also frequent), the page format hadn't changed, but I still faced the same problems as above. Does anyone know how to fix this? P.S- I'm not a computer/formatting whiz, so you'd have to try avoiding the jargon when helping me out, sorry.... (Also I use Chrome...in case that's important.) Also @Oded recommended checking out the browser developer tools and having a look at the CSS, but as I said, I'm no Software/formatting whiz...so I'm still lost....  On @Shadow Wizard 's advice I've taken a screen shot of the 'error' notification (I had to scroll down to get all 10 'errors' on screen, hence the need for separate screen-shots) Is it feasible to compile Python to machine code? I understand that people explain (in layman's terms at least) that the presence of mass "warps" space-time geometry, and this causes gravity. I have also of course heard the analogy of a blanket or trampoline bending under an object, which causes other objects to come together, but I always thought this was a hopelessly circular explanation because the blanket only bends because of "real" gravity pulling the object down and then pulling the other objects down the sloped blanket. In other words, to me, it seems that curved space wouldn't have any actual effect on objects unless there's already another force present.   So how is curved space-time itself actually capable of exerting a force (without some source of a fourth-dimensional force)?  I apologize for my ignorance in advance, and a purely mathematical explanation will probably go over my head, but if it's required I'll do my best to understand. Is there an easy way to 'break' the axis in a pgfplots environment? What I'm talking about is something like     Any minimal plot will do as an example...for example  \documentclass{minimal}   \usepackage{tikz} \usepackage{pgfplots}  \begin{document} \begin{tikzpicture} \begin{axis}[ymin=0, ymax=80] \addplot {x*0};  \addplot {x^2+50}; \end{axis} \end{tikzpicture}  \end{document}   For example, in the below plot,    I want to break the axis from around y = 10 to y = 40.   Any ideas? Does PGF have this functionality? A search for `break' in the manual doesn't yield anything. Does time stretch all the way back for infinity or was there a point when time appears to start in the universe?  I remember reading long ago somewhere that according to one theory time began shortly before the creation of the universe.  Does time have a starting point of note? Passing functions to setTimeout in a loop: always the last value? What is the difference between I play and I do play?  For example:  If someone were to ask to me, do you play soccer? Pagination not working with custom loop Image in a cell with a hyperlink Why can't I import "pygtk" with Python 3.2 from PyDev? What is the best way to randomize an array of strings with .NET? My array contains about 500 strings and I'd like to create a new Array with the same strings but in a random order.  Please include a C# example in your answer. It is well established that:   'In quantum mechanics, the behavior of an electron in an atom is described by an orbital, which is a probability distribution rather than an orbit.   There are also many graphs describing this fact: : (hydrogen atomic orbital - one electron) In the figure, the shading indicates the relative probability to "find" the electron, having the energy corresponding to the given quantum numbers, at that point.  My question is: How do these symmetries shown in the above article occur?                 What about the 'preferable' axis of symmetries? Why these? What is a plain English explanation of "Big O" notation? I'd prefer as little formal definition as possible and simple mathematics. Narration cartoon about a town that has weird paranormal occurrences in it My port of entry and exit is Frankfurt, Germany. However i will only be spending a day or two there. I am visiting Spain and Portugal for a week each. So should I be applying to Spain embassy or German embassy? I am an Indian citizen.