On at least CentOS systems and previous versions of Fedora, I could run the following command and get a list of files with the corresponding grep matches:  $ find -name "version.php" -type f | xargs grep "^\$wp_version" site.com/wp-includes/version.php:$wp_version = '4.7.3';  Apparently though on at least Fedora 22 and newer, running that same command no longer includes the path and filenames:  find -name "version.php" -type f | xargs grep "^\$wp_version" $wp_version = '4.7.3';  I know I can include -l to show just the path, but is there a way to include the path without dropping the match? I don't see anything in the man file.
When using find, how do I return the file name and the line number when searching for a string? I manage to return the file name in one command and the line numbers with another one, but I can't seem to combine them.  File names: find . -type f -exec grep -l 'string to search' {} \;  Line numbers: find . -type f -exec grep -n 'string to search' {} \;
Wi-Fi not working on Lenovo ThinkPad E570 (Realtek RTL8821CE) We just bought a Lenovo  (which is supposed to have the Intel 8265 for wireless). This laptop was bought in part because it is certified to run Ubuntu and as such to me at least it would make sense for things to work out of the box... but no such luck.  First, I installed Ubuntu 17.10 and after installation realised Wi-Fi was not working. I also tried Ubuntu 16.04 from a USB drive since that is the version of Ubuntu it is certified for, but no luck there either.  The wireless chip is not detected by lshw (or even lspci by the looks of it), ip link does not show a wireless interface, and the iwlwifi kernel module is not loaded at boot (I can load this myself using modprobe iwlwifi but this does not make Wi-Fi work). I think it is a combined Wi-Fi/Bluetooth chip, and Bluetooth does appear to work (or at least Bluetooth shows up in Gnome and rfkill list).  modinfo iwlwifi | grep 8265 shows me a file ending in -34 is supposedly loaded but only a file ending in -33 (and some other lower numbers) is present in /lib/firmware, if that helps).  I have also installed the Linux 4.14.9 kernel in an attempt to get things to work, but this did not resolve the issue either.  Further information  root@ThinkPad-E570:~# modinfo iwlwifi | grep 8265 firmware:       iwlwifi-8265-34.ucode root@ThinkPad-E570:~# rfkill list all 0: tpacpi_bluetooth_sw: Bluetooth     Soft blocked: no     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no root@ThinkPad-E570:~# dmesg | grep iwl root@ThinkPad-E570:~# lspci -nnk | grep 0280 -A3 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Update  I just noticed that the laptop does not have an Intel wireless chip at all, but in fact has a Realtek one... which means that the  of the shop I bought this laptop at were not accurate... Sigh. Same problem stands, however, just with a crappier wireless chip. I am currently studying in class 10 and I am unable to do this problem. $$\tan 70 ° -\tan 20° -2 \tan 40° =4\tan 10°$$ Can anybody please help me.  Thanks! Lost/Deleted dpkg (package manager for Debian). How do I get it back? How can I set mouse sensitivity, not just mouse acceleration? Is there anything like “cubic formula”? Just like if we have any quadratic equation which has complex roots, then we are not able to factorize it easily. So we apply quadratic formula and get the roots.  Similarly if we have a cubic equation which has two complex roots (which we know conjugate of each other) and one fractional root, then we are not able to find its first root by hit &amp; trial.  So my question is like quadratic formula, is there exist any thing like cubic formula which help in solving cubic equations?  For example, I have an equation $$2x^3+9x^2+9x-7=0\tag{1}$$ and I have to find its solution which I am not able to find because it has no integral solution. Its solutions are $\dfrac {1}{2}$, $\dfrac{-5\pm \sqrt{3}i}{2} $, I know these solutions because this equation is generated by myself.  So how can I solve equations like these?  Also while typing this question, I thought about the derivation of quadratic formula, which is derived by completing the square method.  So I tried to apply ‘completing the cube’ method on the general equation $ax^3+bx^2+cx+d=0$ but it didn't help.  So please help me in finding a cubic formula or to solve the equations like given in example by an alternative method. How to change language using command line on CentOS 7? I use the following command line to set my system in English (installed in French) :  localectl set-locale LANG=en_US.utf8   However, when I boot into graphical mode, the desktop menu, directories names etc. are still in French.  The only way I can set everything in english is to use the graphical gnome menu "Applications > System tools > Settings > Region and Language".  Is there a way to change system language using command line as if I used the graphical menu?  EDIT :  In fact, my problem was coming from the fact that I was modifying through SSH with user root the system language but then loging through graphical console (workstation VM) under a standard user who has its language already defined. localectl works well but to define default language for a specific user, I must define $LANG in my .bashrc How best to determine if an argument is not sent to the JavaScript function Why is my bash prompt getting bugged when I browse the history? Often when I start looking at history of commands some of the characters from a command displayed aren't erased, for example:  What's happening:  prompt$ some_command prompt$ some_commanother_command   What should have happened:  prompt$ some_command prompt$ another_command   I can't erase those characters and bash ignores them when executing the command. They also disappear when a new prompt is being displayed (after pressing Enter for example).  I asked other people who work on Linux at my workplace and they said that they have that problem sometimes too, but they didn't have an idea on how solve that issue.  I have Ubuntu 11.10 and I'm using guake. Here is my PS1:  \e[0;31m\u \A ${PWD##*/}\e[0;32m$(parse_git_branch)\e[0;31m$\e[m   where parse_git_branch is  parse_git_branch () {     git name-rev HEAD 2&gt; /dev/null | sed 's#HEAD\ \(.*\)# (\1)#' }   As far as I know my colleagues have that problem even with less "fancy" PS1. How do I create directory if it doesn't exist to create a file? Calling sleep(5); and updating text field not working I am solving a series of ODE, such that each DE is equal to some degree of term that I'm expanding to. For instance, one DE is this:  $\xi^r\partial_r g_{rr}+2g_{tt}\partial_t\xi^t=\mathcal{O}(r)$  $g_{ii}$ are given, from metric, but that's not important. I need to assume that the solution (since I'm looking for components of $\xi^\mu$, which is a vector with components $\xi^t,\xi^r,\xi^\phi$) is given with power series of the form:  $\xi^\mu=\sum\limits_{n}\xi^\mu_n(t,\phi)r^n$, and this is to be seen as expansion around $1/r$ (expansion around $r=\infty$).  Now when I plug this in the ODE I get this  $\frac{2}{l^2}\sum_n\xi^r_nr^{n+1}+2\sum_n\xi^t_{n,t} r^n+\frac{2}{l^2}\sum_n\xi^t_{n,t}r^{n+2}=\mathcal{O}(r)$, where   $\xi^\mu_{n,i}$   is the derivative with the respect to i-th component.   What troubles me is, how to expand this? Do I set n=0,-1,-2,... until my $\mathcal{O}(r)$ terms cancel each other out? Or?  I'm kinda stuck :\ How do I close a connection early? Noticing that Newtonian gravity and electrostatics are equivalent, is there also a relationship between the general relativity and electrodynamics? In classical mechanics, we had Newton's law of gravity $F \propto \frac{Mm}{r^2}$.  Because of this, all laws of classical electrostatics applied to classical gravity if we assumed that all charges attracted each other due to Coulomb's law being analogous.  We can "tweak" classical electrostatics to fit gravity.  In modern physics, does the reverse work?  Can we "tweak" General Relativity to accurately describe electrostatics or even electromagnetism? Magnetic Field in the presence of a conductor I am studying for my quals and came across an old question that reads like the following:      There are two regions in space separated by an infinite conducting plane. Region 1 has a magnetic dipole of moment $\vec{\mu}$ located a distance $d$ from the plane. What is the magnetic field $\vec{B}$ everywhere in region 1?   I know that for a perfect conductor (superconductor), the normal component of $\vec{B}$ is zero–although I don't exactly know why–but I don't know if that is the case when the problem involves a "conductor" (not explicitly a perfect conductor).  TL;DR: Can anybody give me some insight about the magnetic boundary conditions of a stationary magnetic field in the presence of a conductor?  Thanks! I was reading . They are performing a logistic regression (with R). At some point they calculate the probability of getting a residual deviance higher than the one they got on a $\chi^2$ distribution with degrees of freedom equal to the degrees of freedom of the model. Copying-pasting from their website...   &gt; glm( cbind(using,notUsing) ~ age + hiEduc + noMore, family=binomial)  Call:  glm(formula = cbind(using, notUsing) ~ age + hiEduc + noMore,            family = binomial)   Coefficients: (Intercept)     age25-29     age30-39     age40-49       hiEduc       noMore       -1.9662       0.3894       0.9086       1.1892       0.3250       0.8330    Degrees of Freedom: 15 Total (i.e. Null);  10 Residual Null Deviance:      165.8  Residual Deviance: 29.92        AIC: 113.4        The residual deviance of 29.92 on 10 d.f. is highly significant:  &gt; 1-pchisq(29.92,10) [1] 0.0008828339       so we need a better model     Why does it make sense to compute 1-pchisq(29.92,10) and why does a low probability indicate that something is going wrong with their model? If $\gcd (x,4) = 2$ and $\gcd(y,4) = 2$ then $\gcd(x+y,4) = 4$ I was working my way through some number theoretic proofs and being a newbie am stuck on this problem :     If $(x, 4) = 2$ and $(y, 4) =2$, then $(x + y, 4) = 4$,     where $(a,b)$ denotes the greatest common divisor of $a$ and $b$.   My Solution  (Incorrect)   $x-4 = 2t$ $y-4 = 2p$ $x + y - 8 = 2(t+p) \Rightarrow x + y - 4 = 2f + 4 = 2(f+2)\Rightarrow 2$ divides $(x+y , 4)$   My Question:  My solution is definitely inadequate. Can someone help me out? Why is the probability that a continuous random variable takes a specific value zero? My understanding is that a random variable is actually a function $X: \Omega \to T$, where $\Omega$ is the sample space of some random experiment and $T$ is the set from which the possible values of the random variable are taken.  Regarding the set of values that the random variable can actually take, it is the image of the function $X$. If the image is finite, then $X$ must be a discrete random variable. However, if it is an infinite set, then $X$ may or may not be a continuous random variable. Whether it is depends on whether the image is countable or not. If it is countable, then $X$ is a discrete random variable; whereas if it is not, then $X$ is  continuous.  Assuming that my understanding is correct, why does the fact that the image is uncountable imply that $Pr(X = x) = 0$.  I would have thought that the fact that the image is infinite, regardless of whether it is countable or not, would already imply that $Pr(X = x) = 0$ since if it is infinite, then the domain $\Omega$ must also be infinite, and therefore  $$Pr(X = x) = \frac{\text{# favorable outcomes}}{\text{# possible outcomes}} = \frac{\text{# outcomes of the experiment where X = x}}{|\Omega|} = \frac{\text{# outcomes of the experiment where X = x}}{\infty} = 0$$  What is wrong with my argument?  Why does the probability that a continuous random variable takes on a specific value actually equal zero? Expressing an opinion: to me or for me? Why would I vote for an increase in the number of authorized shares? Does anyone know what song plays at about ?