I want to write a script which gets the latest file from a list of zipped files and then unzip the file  I have tried ls -t1 |  head -n 1 -exec unzip {} -->  to get the latest zipped file. and unzipping it but it is not working
I have created two files:  sample.txt and sample.txt  (the second file contains some hidden characters, e.g. a space). How can I remove the latest modified file? I'm using Linux.
Writing my first script so I'm sure this is a basic question, but can someone please explain to me why I can:  cd ~ cd bin cd ~/bin cd 'bin'   But not  cd '~' cd '~/bin'   I need to cd to a directory path with a space in one of the directory names, so I need the quotes (it's Windows Program Files under wine). I can get around it with two cd commands, but why can't I put ~ in quotes?  If I type cd '~' (or cd "~") I get:  bash: cd: ~: No such file or directory I just had a case of a user who re-posted his question because his first question was closed as a duplicate. And, logically, I closed his re-post as a duplicate of his original, asking him to edit his original and explain why it's not a duplicate, so we can reopen it.  This process has worked like that for years now, but suddenly I realized that with the new message, question repetition is even encouraged:     This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.   Clearly, a new user who finds their questions closed will now be happy to just post their question again and again, until it's not a duplicate anymore, instead of just fixing their original post.  We need to be more explicit about this, and show this message to the OP of the question:     If those answers do not fully address your question, please edit your question and explain why it is not a duplicate.   The original message should still be visible to other users and visitors, as they can't fix that question, of course. I'm trying, but something is wrong with my code in LaTeX: \begin{asy} pair dynkinMark(real x, real y, string s = &quot;&quot;, pen p = defaultpen, pair B = dir(45)) { if (s != &quot;&quot;) { dot(&quot;$&quot;+s+&quot;$&quot;, (x,y), B, p); }     else { dot((x,y), p); }     return (x,y); }  dynkinMark(0,1, &quot;1&quot;, dir(135)); dynkinMark(0,2, &quot;2&quot;, dir(135)); dynkinMark(0,3, &quot;3&quot;, dir(135)); dynkinMark(0,4, &quot;4&quot;, dir(135)); dynkinMark(7,1, &quot;1'&quot;); dynkinMark(7,2, &quot;2'&quot;); dynkinMark(7,3, &quot;3'&quot;); dynkinMark(7,4, &quot;4'&quot;); path p1 = (0,1)..(2,2.0)..(5,3.5)..(7,4); path p2 = (0,2)..(2,1.2)..(5,2.5)..(7,3); path p3 = (0,3)..(2,2.8)..(5,1.5)..(7,1); path p4 = (0,4)..(2,3.8)..(5,3.5)..(7,2); draw(p1, blue); draw(p2, heavycyan); draw(p3, mediumcyan); draw(p4, lightblue); dot(&quot;$12$&quot;, IP(p1, p2), dir(90), heavygreen); dot(&quot;$13$&quot;, IP(p1, p3), dir(90), heavygreen); dot(&quot;$23$&quot;, IP(p2, p3), dir(90), heavygreen); dot(&quot;$14$&quot;, IP(p1, p4), dir(90), heavygreen); dot(&quot;$24$&quot;, IP(p2, p4), dir(90), heavygreen); real y = 0.8; label(&quot;$s_1$&quot;, (IP(p1,p2).x, y), heavygreen); label(&quot;$s_2$&quot;, (IP(p1,p3).x, y), heavygreen); label(&quot;$s_1$&quot;, (IP(p2,p3).x, y), heavygreen); label(&quot;$s_3$&quot;, (IP(p1,p4).x, y), heavygreen); label(&quot;$s_2$&quot;, (IP(p2,p4).x, y), heavygreen); \end{asy} What pressure should I run my Road Bike tyres at? There's a question for mountain bike tyres but I can't seem to find anything on here for road bikes. At the moment I'm running at around 90psi. Is that too much? too little?  Also, am I more likely to get punctures running at higher pressure?  I seem to be getting a lot lately. Why isn't $V= V_1 + V_2$? $V=V_a - V_c = V_a - V_b + V_b - V_c$, $V_a - V_b= V_1$ and $V_b - V_c = V_2$ Doesn't that prove that $V = V_1 + V_2$? Regardless of $V_3$, If i'm wrong , is there a way to obtain $V$ in terms of $V_1$, $V_2$ and $V_3$ Inconsistent accessibility error with the following c# code. Why? Pass by Reference / Value in C++ I would like to clarify the differences between by value and by reference.  I drew a picture     So, for passing by value,  a copy of an identical object is created with a different reference, and the local variable is assigned the new reference, so to point to the new copy  How to understand the words: " If the function modifies that value, the modifications appear also within the scope of the calling function for both passing by value and by reference "  Thanks! If we remove the square in the upper right corner of a $8\times 8$ chessboard.  The question is: Is it possible to cover the entire remaining area, with $1\times 3$ chocolate bars? (they can be laid on the chessboard vertically and horizontally aswell)  For the answer: We know that there will be $63$ squares left on the chessboard, of which $32$ are white and $31$ are black, since the one in the upper right corner was black. $63$ is divisible by $3$, so it could be possible to cover the area, but that doesn't prove that an arrangement exists to do it. I'm not sure how to continue and am seeking help. Thanks. Is it wrong to place the  tag after the  tag? Is there an issue tracker for already reported Mathematica bugs? Applications Don't Show Up in Spotlight Spotlight has stopped showing any results for my Applications. I've tried reindexing and removing the index so it rebuilds it. No change. I've tried adding Applications to the Privacy tab and removing it, no change.  I tried repairing disk permissions and redoing the above, no change. I've tried removing everything from the index except Applications and then I just get nothing for any search at all (except dictionary entries).  I tried adding a symlink in my homedir to Applications and reindexing, but no change.  Any ideas on what to do?  I'm running Snow Leopard.  This is driving me crazy!  Update: I've noticed that when I start a reindex with sudo mdutil -E / and then immediately do a Spotlight search for an app that the app shows up temporarily until Spotlight gets disabled due to active indexing.  After the indexing is done, the app entries go away. Rolling back a completely changed question was originally asked August 9, and received answers. A month later, the OP  the question, invalidating the existing answers. I rolled it back, and left a comment to say that a new question should be opened, but the OP changed it back saying "There is no rule about it, so you can't edit my post."  There is also a bounty on this question, making things more interesting.  What are the guidelines on completely changing a question or rolling back changed questions? Was I out-of-line rolling back the question?  I have no desire to get into an edit war, so I'm not going to touch the question again. If a moderator wants to get involved, great. Get Emacs to ignore contents of \Sexpr{} command in Sweave document to prevent incorrect $-based syntax highlighting Unable to install ECW support on lubuntu 14.04 It's been said that .  It the corresponding statement true for typical cryptographic hashes, like MD5, SHA-1, SHA-2 or SHA-3?  For example, would SHA-512 be bijective when hashing a single 512 bit block? Proofs involving $ (A\setminus B) \cup (A \cap B)$ Give short arguments for each part below to complete the reasoning. Please do not use Venn diagrams.     a. Prove that $A = (A\setminus B) \cup (A \cap B)$.   (Hint: You should prove that $(A\setminus B)\cup (A\cap B) \subseteq A$ and vice-versa)      b. Prove that $(A \setminus B) \cap (A \cap B) = \emptyset$   (Hint: Try a proof by contradiction for this statement.).    I'm not too sure exactly where to start on this. Both statements make sense logically, but I don't know how exactly to prove them. Can anyone point me in the right direction? Induction and electromagnetic fields I've got a few questions on induction and electromagnetic fields. My current understanding of induction and electromagnetic fields is that, when electricity/current flows through a wire, it creates an electromagnetic field. If you twist that wire into a coil then you can concentrate that field. You can then induce current into a different coil by placing it inside of the electromagnetic field created by the first coil.  So here are my questions:  Q1. Does the electromagnetic field contain any energy?  EDITED QUESTION  Q2. Electromagnetic fields are the same as waves, so does that mean that when current is induced, they get the energy from electromagnetic waves being exchanged, or do they induce current directly from the electromagnetic field?   Q3. If electromagnetic fields and waves are the same, then doesn't that mean that you can induce current from waves? Therefore transferring electricity over long distances?  Q4. What spectrum of light are the electromagnetic waves that are in a field created by electricity?  Q5. Finally, why is it not possible to induce current from the Earth's magnetic field? I thought Maxwell said that electric fields and magnetic fields were the same thing.   Thank you to anyone who answers.  Edited Q2: So my original question (although asked poorly) still stands. Where does the current that gets induced in the secondary coil come from? How does the electricity transfer from the primary coil to the secondary? For example, is it taken from the stored energy in the e.m field? Does the field just act as a bridge between the 2 coils? Or do the 2 coils exchange e.m waves which carry the electricity that is being transferred from coil 1 to coil 2? Or is it none of these things and something completely different? How to change file extension at runtime in Java This question arises when I try to describe my itinerary to ticket service in the UK. Take for example, I plan to buy a ticket from A to B. B is the terminal. How to say its counter part A? I cannot find a proper term. I have to say "I will depart from A" or "I plan to go to B from A". Or I even use "departure place" to refer to B. I was wondering if mobs can go through doors or not. It's the difference between me just putting up a door to my house, or putting up dirt instead.