Here is a command that sorts files in a folder in reverse order  ls | sort -r   What does the | symbol in that command do?   What I'm really looking for here is high level (easy to understand) explanation of pipes for Linux beginners. I see other questions about pipes here on Superuser, but nothing that elicits an answer that explains in simple terms what they do and how they differ from redirection (the &gt; or &lt; symbol).
I dont quite understand how pipes work in bash.  I know that it takes an output from one command as the input in another command.  What an output is I can get because it's what the command prints out to the screen.  But how do I know what input a command will take?  Here is an example I thought would work:  which gem | rm   Unfortunately it didn't.  Which gem prints out /usr/bin/gem so that must be the output right?  I thought that was given to rm so it woud be rm /usr/bin/gem but I was wrong.  So my question is, how do I know what input a command takes?
How to extract logs between two time stamps I want to extract all logs between two timestamps. Some lines may not have the timestamp, but I want those lines also. In short, I want every line that falls under two time stamps. My log structure looks like:  [2014-04-07 23:59:58] CheckForCallAction [ERROR] Exception caught in +CheckForCallAction :: null --Checking user-- Post [2014-04-08 00:00:03] MobileAppRequestFilter [DEBUG] Action requested checkforcall   Suppose I want to extract everything between 2014-04-07 23:00 and 2014-04-08 02:00.  Please note the start time stamp or end time stamp may not be there in the log, but I want every line between these two time stamps. How to find the value of $\lim_{n\to\infty}S(n)$, where $S(n)$ is given by $$S(n)=\displaystyle\sum_{k=1}^{n} \dfrac{k}{n^2+k^2}$$   is unable to calculate it.  This is a question from a questions booklet, and the options for the answer are--  $\begin{align} &amp;A) \dfrac{\pi}{2} \\ &amp;B) \log 2 \\ &amp;C) \dfrac{\pi}{4} \\ &amp;D) \dfrac{1}{2} \log 2 \end{align}$ How do I install an individual package on a Linux system? I need to install a new TeX/LaTeX/ConTeXt package on my computer.  I'm running Ubuntu/Fedora/Slackware/Some-Version-Of Linux.  What are the possible ways to do this?    Note:&nbsp;&nbsp; We get a number of questions that essentially reduce to this one; it was felt a good idea to have one question-and-answer that can cover all the standard methods.  See  for the discussion.  The question-and-answer are CW so that more information can be easily added.  If you have information to add, please do so.  If you are unsure, leave a comment here or (preferably) in .  Comments on the question and answer will be periodically removed to ensure that the information is clear. Is there a tool to get the lines in one file that are not in another? Is there any tool that can get lines which file A contains, but file B doesn't? I could make a little simple script with, e.g, perl, but if something like that already exists, I'll save my time from now on. Clock time is off on dual boot Dual boot system Windows XP Pro and Ubuntu 12.04.  I have the bios set for the correct time and Ubuntu set for US Eastern time.  Ubuntu will boot up and the time will be off by -4 hours.  If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.  This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu. What happens if my shield breaks? Show that every uncountable set of real numbers has a point of accumulation. Temporarily change language for terminal messages/warnings/errors Messages in my terminal are displayed using Russian language by default, which is my native one.  For just a moment I want them to be in English (eg. to paste in forums), then switch back to the default language.  How can I do the switch and switch back using bash? How do I create bookmarks with pdfLaTeX? I'm using MiKTeX and using pdfLaTeX. I can generate the PDF, but there are no bookmarks. In the .tex-file it is using:  \chapter \section \subsection   (with labels)  I originally used make with sphinx to output LaTeX. It must work somewhat or I wouldn't get the PDF. When I say bookmarks, I mean when you are in Acrobat and the left side has the Bookmarks panel.  I am reading   But I am not sure where to apply this.  EDIT:  I applied this, \usepackage{bookmark}, and got bookmarks, but I never get the subsection bookmarks. What's the difference between term_id and term_taxonomy_id TikZ or cryptocode package for cryptographic protocol diagrams I want to be able to lock my translation/scale operations to two axes at a time, say xy, xz or yz. It currently takes two operations (one for each axis).  Example, say for a cylinder, I would like to reduce the radius. I currently have to scale on the x axis first, then on the y axis, or I have to manually input the scale values in the object properties panel.  This option is easily accessible in 3dsmax via the axis constraints command bar. Or I can click the intersecting area between the 3d manipulator of the axes in question and move in that plane. Encopresis: how can we encourage our child to clean himself or ask for help immediately instead of ignoring the dirty underwear? I know that children’s books is correct, but for some reason I want to say kids books, even though I know that it’s a plural possessive noun ending in an s.   A quick search on the web turns up Barnes &amp; Noble, who have a web page title that reads “Children's Books, Kids Books”.   Is the major bookseller wrong here? Or is there some exception I don’t remember?  More simply, is it kids books or kids’ books — and why? Command to append line to a text file without opening an editor Assuming i have a line that i want to add to a file without opening an editor.  How could i append this line  alias list='ls -cl --group-directories-first'   to this file  config.fish Installing Nvidia drivers on Red Hat Modular exponentiation by hand ($a^b\bmod c$) How do I get the size of a directory on the command line? I tried to obtain the size of a directory (containing directories and sub directories) by using the ls command with option l. It seems to work for files (ls -l file name), but if I try to get the size of a directory (for instance, ls -l /home), I get only 4096 bytes, although altogether it is much bigger. How to specify password in ssh command From the terminal I type: ssh user@ip and then it prompts for a password.  Is there a way to specify the password in the ssh command itself? Why use hex? Hey! I was looking at this code at   I noticed that in some situations they used hex numbers, like in line 134:  for (j = 1; val &amp;&amp; j &lt;= 0x80; j &lt;&lt;= 1, q++)   Now why would they use the 0x80? I am not that good with hex but I found an online hex to decimal and it gave me 128 for 0x80.  Also before line 134, on line 114 they have this:  small_n = (n &amp; 0xffff0000) == 0;   The hex to decimal gave me 4294901760 for that hex number. So here in this line they are making a bit AND and comparing the result to 0??  Why not just use the number? Can anyone please explain and please do give examples of other situations.  Also I have seen large lines of code where it's just hex numbers and never really understood why :(