How can I recursively replace a string in all folders and files' name with a different string? I am running Red Hat 6 and I can find them with:  find . -name \*string\*   I've managed to do it for strings within files:  find . -type f -exec sed -i 's/string1/string2/g' {} +   but how could I replace in a similar way all file names?
I have a directory full of images:  image0001.png image0002.png image0003.png ...   And I would like a one-liner to rename them to (say).  0001.png 0002.png 0003.png ...   How do I do this?
I realize this isn't possible, but I can't see why not, especially if you change the model a little bit so that the balls simply travel through a tube of water on the way up, rather than exactly this model.  Please be clear and detailed.  I've heard explanations like "the balls wouldn't move" but that doesn't do it for me - I really do not see why the balls on the right would not be pulled/pushed up, and the rest of the chain wouldn't continue on. Sometimes writing braces and omitting them produces the same result:  \tilde{\psi}  \mathrm{e}^{\mathrm{i} \pi}   vs  \tilde \psi   \mathrm e^{\mathrm i \pi}   Or (taken from Werner's comment below)   \frac{1}{2} vs \frac12   If that's the case, how bad for the quality of my code is omitting them? Of course, if one compiles a pair of formulas, there is no difference. But, since I ignore how TeX works, my point is: if one writes long codes with these habits,   doesn't TeX go somehow crazy because I'm not writing as it expects?   For instance, does it have any effect on how fast are long documents compiled? Any reason to keep them? font-not-found error: font "HoeflerText" cannot be found -- LuaLaTex error! I am running this CV/Resume example from :   Here is a relevant fraction of the code:  \documentclass[10pt]{article} %!TEX encoding =  UTF-16 % See geometry.pdf to learn the layout options. There are lots. \usepackage[hmargin=1.25cm, vmargin=1.5cm]{geometry} %symbols - the ones you see on the left of the email and of the phone \usepackage{bbding} \usepackage{amssymb} \usepackage{eurosym} %Colors/Graphics \usepackage{color,graphicx} \usepackage[usenames,dvipsnames]{xcolor}  %Fonts and Tweaks for XeLaTeX \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text} \setromanfont[Mapping=tex-text]{Hoefler Text} ...   So... when compiling with LuaLaTeX (part of MiKTeX on Windwos XP x64), I am getting the following error:  ... luaotfload | Font names database loaded: C:/Documents and Settings/Ampleforth/L ocal Settings/Application Data/MiKTeX/2.9/luatex-cache/generic/names/otfl-names .lua luaotfload | Updating the font names database: luaotfload | Scanning TEXMF and OS fonts... luaotfload | Font names database saved: %s  : C:/Documents and Settings/Ampleforth/Local Settings/Application Data/MiKTeX/2 .9/luatex-cache/generic/names/otfl-names.lua  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !  ! fontspec error: "font-not-found" !  ! The font "HoeflerText" cannot be found. !  ! See the fontspec documentation for further information. ! For immediate help type H &lt;return&gt;. !...............................................    l.28 \setromanfont[Mapping=tex-text]{Hoefler Text}   What is wrong? How can I install this font so LuaLaTeX is picking it up? Where to download? Any other thoughts about this? How to remove the "Could not connect to the iTunes store" error message when your network does not allow access to the iTunes Store How can I view the contents of tar.gz file without extracting from the command-line? Is it valid to have more than one question mark in a URL? Also schemas can communicate over database links to schemas in other remote databases.    Could one replace the preposition over with through? Will it change the meaning, and if so, when should we use over instead of through? I was given a laptop with a totally dead display. I do not want to pay to replace the broken display, but I would like to use the laptop as a server and connect to it via SSH to control it.  I have pulled out the internal hard drive from the broken laptop, and I want to install Debian GNU/Linux and the SSH server onto this HDD using a working Debian laptop.  However, the hardware in the two laptops is very different, and I am wondering what kind of problems I would run into when I plugged the drive back in to the laptop with the broken display because of this?  How would I make this work? What is the proper way for me to install a bootable copy of Linux onto a HDD that will be used by a computer with different hardware? Can you break up your Attack action for a bonus action? You can do it to move:     If you take an action that includes more than one weapon attack, you can break up your movement even further by moving between those attacks. For example, a fighter who can make two attacks with the Extra Attack feature and who has a speed of 25 feet could move 10 feet, make an attack, move 15 feet, and then attack again. (PHB 190)   It would be necessary for the Great Weapon Master feat:     On your turn, when you score a critical hit with a melee weapon or reduce a creature to 0 hit points with one, you can make one melee weapon attack as a bonus action   As a level 17 Fighter, if I can not place a bonus action between attacks, there are two possibilities:   I have to wait until I finished all 4 attacks of the action, to make another attack as a bonus action the bonus action attack is wasted unless the kill or crit happens on the 4th attack   So can I take a bonus action in the middle of the attacks of an action? What is this "answer your own question" jazz? Modifying list while iterating I have a PC who wants to jump onto an enemy in a combat situation. The player wants him to land on the (humanoid) enemy, sword drawn, and use the enemy to break his fall while plunging shortswords into it. I thought of using a straight attack roll, because it was only a 12 foot drop from the ledge to the top of the enemy. But I would imagine a lot would depend on the distance, and also whether the enemy might suspect such an attack. Also, I would expect the PC would take damage on a miss, but how about on success? Show that $\text{C}/c \cong (c/(\text{C}^{\text{op}}))^{\text{op}}$ I'm self studying from Category Theory in Context by Emily Riehl and have encountered the following question regarding slice categories:     Let $\text{C}$ be a category and $c$ be an object in $\text{C}$. Show that $\text{C}/c \cong (c/(\text{C}^{\text{op}}))^{\text{op}}$    The exercise appears in an chapter that introduces the notion of opposite categories and duality proofs.     My intuition of why the statement is true comes from the following observation:  Let $x,y$ be objects in $\mathbf{C}$ (or equivalently $\mathbf{C}^{\text{op}}$). Let $g^{\text{op}} : c \to y$ and $f^{\text{op}} : c \to x$ be objects in $c/(\mathbf{C}^{\text{op}})$. By the definition of slice category, there exists a morphism $h^{\text{op}} : y \to x$ in $\mathbf{C}^{\text{op}}$ such that the diagram below commutes:  $\hskip2in$   Now the 'corresponding diagram' in the opposite category $(c/(\mathbf{C}^{\text{op}}))^{\text{op}}$ would be:  $\hskip2in$    which, as I understand it, would also be commutative. Now, to me, this indicates:   that the objects in $(c/(\mathbf{C}^{\text{op}}))^{\text{op}}$ are the same as the objects in $\mathbf{C}/c$, namely, a morphism in $\mathbf{C}$ from an object $z \in \mathbf{C}$ to $c$. the commutativity of the seconds diagram describes morphisms $h$ in both $\mathbf{C}/c$ and $(c/(\mathbf{C}^{\text{op}}))^{\text{op}}$ if you reverse the arrows again you return to the same diagram. This makes me think you could construct a map between morphisms by first making a map from $ \mathbf{C}/c \to (\mathbf{C}/c)^{\text{op}} ( \cong c/(\mathbf{C}^{\text{op}}) )$ by $h \mapsto h^{op}$     Now, what I am really looking for is a way to structure a proof. I feel like I have some intuition but am very unsure of how to write it down in a concise way. I am new to category theory so I'm still very much learning how to construct these types of proofs using duality; I feel like what I have written is maybe overkill but I'm trying to be as explicit as possible to make sure I understand everything.  In particular, I don't know how I would get a concrete correspondence between morphisms in the two categories that respects associativity of composition etc.  Any help or pointers would be appreciated! Is there any way you could revive Guest Sessions in a future LTS distro?  Guest sessions are good security - they give me just enough power to do what I need to do on a daily basis without risking my system. In short, Guest sessions save me from myself.  I had upgraded from 16.04 to 18.04, gotten a problem I couldn't fix and was all to happy to wipe and rebuild my hard drive and return to 16.04.  I can't be the only one who feels this way. Best way to implement keyboard shortcuts in a Windows Forms application? Reference template variable within Jinja expression Is returning a pointer to a static local variable safe? I'm working with some code that widely uses the idiom of returning a pointer to a static local variable.  eg:  char* const GetString() {   static char sTest[5];   strcpy(sTest, "Test");   return sTest; }   Am I right in thinking that this is safe?  PS, I know that this would be a better way of doing the same thing:  char* const GetString() {   return "Test"; }   Edit: Apologies, the function signature should of course be:  const char* GetString(); How can I find the product key of Office 2011 after restoring from backup? I had to restore my iMac from a Time Machine backup.  Everything seemed fine until I tried to start Office 2011 and it is asking me to re-enter my product key. I am trying to locate my key (I believe I downloaded this version originally and it should be in my email but I can't find it)  I tried a program that is supposed to "find the keys for products installed on your computer" (Mac Product Key Finder) and it found my very old Office 2008 key, but not 2011.  I am surprised that if I had a totally working install before recovering from back-up that this wasn't restored as well - do I have any options to find it hiding somewhere on my drive?  Note: The recovery was after a hard drive was replaced by the Apple store - if that makes a difference, so this is a new internal drive. My question might appear the same as the question , but actually I did read all the answers and none of them helped me with the details I need.  I am new to cryptography and my problem is with two time pad attacks on OTP. The problem I had in my course was that I have 10 ciphertexts encrypted with the same key $K$. I am then given another ciphertext that I should decrypt.  I know that XOR-ing two ciphers gives me the XOR of their original messages.  My question is what is the correct thing to do after that?  I tried to take 3 ciphertexts $C_1, C_2$ and $C_3$.  Then get $S_1 = C_1 \oplus C_2  \oplus $' ', also get $S_2 = C_1 \oplus C_3 \oplus$ ' '.  After that I compared all corresponding characters in $S_1$ and $S_2$,  and if $S_1[i] = S_2[i]$ then I calculate $S_1[i] \oplus C_2[i]$ to get $K[i]$.  I tried this on paper before coding and it worked, but I might be missing something.  Is this the right approach? Why does it work? Does there exist a holomorphic function with the following property?