I have a folder that consists of other folders (whose names are unknown), .tar archives and JPEG images. How can I remove everything except .jpeg files?
I have a directory that contains the following:  x.pdf y.zip z.mp3 a.pdf   I want to delete all files apart from x.pdf and a.pdf. How do I do this from the terminal? There are no subdirectories so no need for any recursion.
Let's fix some terminology first. A category $\mathcal{C}$ is preabelian if:  1) $Hom_{\mathcal{C}}(A,B)$ is an abelian group for every $A,B$ such that composition is biadditive,  2) $\mathcal{C}$ has a zero object,  3) $\mathcal{C}$ has binary products,  4) $\mathcal{C}$ has kernels and cokernels.  A category $\mathcal{C}$ is abelian if it is preabelian and satisfies:  5) every monomorphism is a kernel and every epimorphism is a cokernel.  Define the coimage of a map to be the cokernel of its kernel, and the image to be the kernel of its cokernel. We have the following commutative diagram:    where $\overline{f}$ is the only existing map (because of universality of kernel and cokernel).  I'm having trouble proving the following:     A preabelian category $\mathcal{C}$ is abelian iff $\overline{f}$ is an isomorphism.   The converse is easily shown, I'm having trouble proving $\Rightarrow$... How to use the Alt + Right click in edit mode in Linux Why does Linux show both more and less memory than I physically have installed? If $\forall x \in R, x^2-x \in Z(G)$, than $R$ is commutative Let $R$ be a ring such that for every $x\in R$ we have $x^2-x \in Z(G)$. Show that $R$ is a commutative ring.    My thoughts  What should I do? I could show that every $y \in R$ could be written in the shape $x^2-x$ but I don't know if that is true. We know that  $y \cdot(x^2-x) \ = \ (x^2-x)\cdot y$ for any $x,y \in R$, but that doesn't mean that $xy = yx$. Please give me a hint What is the Physical Meaning of Commutation of Two Operators? What is the difference between logistic regression and Fractional response regression? I want to transfer my current system hard drive to a larger hard drive. Doing so, I thought of creating an image of my system hard drive which is 320 GB in size.   Would I be able to restore this image on a larger hard drive? I plan buying a 1TB hard drive.  If yes, how? I prefer no data loss.  I am using Windows 7 Were any of the Elves in Tolkien twins? Thinking about the idea of Elves having low numbers overall, got me to wondering: as far as Tolkien's writing, could elves ever have twins?  As a "yes" answer, I need an example of twins (any of JRRT work). They must be full on Elves, not half-Men. As a "no" answer, has to be an explicit statement in his work stating Elves ALWAYS had one child at a time. Anything else is a "maybe, we don't know". I want to be able to program a  with  but I'm not sure what pins on the actual chip I should use, and all the guides seemed to be using a different chip What happens when Wild Shape/Polymorph runs out in a space that's too small? Current code is:  \begin{enumerate}[label=LEVEL \arabic{*},leftmargin=*]     \item Description of Level 1 \quad L1 \\ \emph{more text}     \item Description of Level 2 \quad L2 \\ \emph{more text}  \end{enumerate}   but the \quad does not align L1 and L2 uniformly vertically. I want to replace \quad with a tab but the tabbing environment does not allow mixing with an enumerate! I have an image with a woman, and I need to make an ad (size 260mmx125mm). I want to put the woman to the left side, but then right side becomes empty. So, how I should solve the problem? I have picked the color from image, but it is definitely different than in the actual picture.  Should I use the Clone Stamp Tool in Photoshop, or there is a better way to do this?  By the way, it will be used in print, so I need a good quality. Finding determinant for a matrix with one value on the diagonal and another everywhere else Let us look the the matrix  $\left(\begin{array}{ccccc} a &amp; b &amp; b &amp; b &amp; b\\ b &amp; a &amp; b &amp; b &amp; b\\ b &amp; b &amp; a &amp; b &amp; b\\ b &amp; b &amp; b &amp; a &amp; b\\ b &amp; b &amp; b &amp; b &amp; a \end{array}\right)$  It has one value, $a$, on the main diagonal, and another value, $b$ everywhere else. Let us assume that we are over a ring and that $a$ is invertible.  I wish to find the determinant of every $n\times n$ matrix of this form ($a$ on the diagonal, $b$ everywhere else). Using row and column operations I have managed to transform the matrix to upper-triangular form and found formula for specific cases. Generalizing it I got to the following formula:  $\det(A) = a\left(a-b\right)^{n-2}\left(a+\left(n-2\right)b-\frac{\left(n-1\right)b^{2}}{a}\right)$  I think I can prove it with row-operations in the general case with a little patience.  However, I'm wondering if there is a "smart" way of getting to this formula that I'm missing and if there is a nicer representation of it. Also, what can be said when $a$ is not invertible? (esp. the case where we are over a field and $a=0$). How to know if something is a primitive concept, a law, a definition or a theorem Some basic Physics books are often misguiding in the sense that they don't make clear whether something is a primitive concept, a law, a definition or a theorem. This is often a little confusing. I've asked here some moments ago if there's a definition of force, and I've been redirected to a question about whether Newton's Laws are laws or definitions of mass and force.  This is just an example, but there are many others, like for instance, the conservation of energy, which some books present as a theorem, and some places says that this is a law of Physics. Time on the other hand, is something that according to Feynman's lectures on Physics, cannot be defined, so we just say how to measure it and leave it as a primitive concept.  In this context: how in general can we identify whether something is a primitive concept, a fundamental law of Physics, a definition or a theorem? How to convert a one digit number to a two digit number I have a table that represents a timetable for bus, so each cell contains time of departure as hour followed by minute, both as two digits, but sometimes I don't have two digits,just one so I have to switch eg. from 12 4 -&gt; 12 04. How is it possible? Why are relays so frequently driven by optocouplers? Let $A$ and $B$ be two matrices which can be multiplied. Then $$\operatorname{rank}(AB) \leq \operatorname{min}(\operatorname{rank}(A), \operatorname{rank}(B)).$$   I proved $\operatorname{rank}(AB) \leq \operatorname{rank}(B)$ by interpreting $AB$ as a composition of linear maps, observing that $\operatorname{ker}(B) \subseteq \operatorname{ker}(AB)$ and using the kernel-image dimension formula. This also provides, in my opinion, a nice interpretation: if non-stable, under subsequent compositions the kernel can only get bigger, and the image can only get smaller, in a sort of loss of information.  How do you manage $\operatorname{rank}(AB) \leq \operatorname{rank}(A)$? Is there a nice interpretation like the previous one? How do I change my update server in Ubuntu 18.04? Why don't we consider jerk in physics classes? When I got more into physics, I started asking myself if just like acceleration represents the growth of speed, something else could also represent the growth of acceleration itself. And it came that is exists and is called jerk. Before I thought about this, I thought that acceleration was the highest derivative that made sense on physics.  My question is, why can we perform accurate calculations without account for jerk? I never needed it in a single physics class! I've also read that it is seldom used.  Also, while position, speed and acceleration seem familiar to me due to everyday experience, why doesn't jerk seem familiar to me? I never tell someone when driving a car "you're jerking too much", whereas I could say "you are accelerating too much".  Is it that jerk has little influence because it is almost constant? Even if it is not, what about higher order derivatives? Why don't derivatives higher than acceleration have much influence on calculations? We perform a lot of reasoning in everyday life without resorting to it! The question is as follows:      Let $A'$, $B'$ and $C'$ be the midpoint triangle of triangle $ABC$. In other words, $A'$, $B'$ and $C'$ are the midpoints of segments $BC$, $CA$ and $AB$, respectively. Show that triangles $A'B'C'$ and $ABC$ have the same centroid.    My reasoning was through the means of the Midline Theorem. After drawing the diagram, we can see, for example, $C'A'$ is a midline of $\triangle ABC$, which means that $C'A'$ is parallel to the base $AC$ and half the length of it as well. Therefore, the median $B'B$ would pass through the midpoint of $C'A'$, including the midpoint of $AC$.   Is my reasoning valid or, at least, is it on the right track? Any advice on solving this problem will be greatly appreciated.