This is my output on CentOS.   [test@test]$ sudo fallocate -l 2M text [test@test]$ sudo echo “This is for test” | tee text tee: text: Permission denied “This is for test” [test@test]$ ls text [test@test]$ cat text [test@test]$ [test@test]$ sudo yes 'This is test' | dd of=text bs=2M count=1 dd: failed to open ‘text’: Permission denied   I keep getting the 'Permission denied' error. But I have sudo permissions.
When you attempt to modify a file without having write permissions on it, you get an error:  &gt; touch /tmp/foo &amp;&amp; sudo chown root /tmp/foo &gt; echo test &gt; /tmp/foo zsh: permission denied: /tmp/foo   Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway:  &gt; sudo echo test &gt; /tmp/foo zsh: permission denied: /tmp/foo   Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way?  &gt; sudo su # echo test &gt; /tmp/foo
Can I use my laptop as a second monitor? Vortex in liquid collects particles in center Why am I getting different results from two servers that located in the same destination network? There's two servers with the same network IP, and the only difference between them is the last two numbers like: 37.211.15.247 and 37.211.166.178. The Hosting Provider claims that the subnet mask for both networks is 255.254.0.0  When I try the command Tracert (Traceroute) to test the ping and to see what hops does it take to reach the destination server, I get different ping times and different forward path results which is strange because they are all located in the same company host.  Is there something wrong? Shouldn’t it take the same path too?  I have added the the full IP addresses to both servers as requested by some commenters. Well the two servers aren’t “International” anyways, so as far as I know, the only thing that comes to mind is the possibility that the two are configured on different subnetworks just like what . Though it’s suspicious.  UPDATE: After doing so much research, I found out the Subnet of these two hosts. They are on a /15 (255.254.0.0) subnet mask. Unfortunately, this is what that hosting provider claimed to me which is not true, and the true Subnet they apparently use is a /17 (255.255.128.0) Subnet mask. It turns out that they were definitely on different Subnets. That's why I got different traceroutes when I tested these two IPs 37.211.15.247 and 37.211.166.178  because they are clearly on different Subnets. Thank you everyone for these good answers, especially  his answer helped me a lot. prove that there are infinitely many numbers of the form $x = 111....1$ such that $31\mid x$ Are old (>35) faculty candidates discriminated against all over the world? I think that in India research institutes will never take a faculty candidate who is over 35. Is it so all over the world?   I am asking this question from the point of view of if someone starts their PhD. at the age of 27 then its unlikely they will be faculty candidates till they are 40. DNS Resolution for example.com - Can you explain? Could 'cogito ergo sum' possibly be false? Cron Job not working in plugin I have written a plugin that will convert posts to excel format and then email the .xls to an email id. I can make it work with when function is declared in functions.php but does not work with function defined in plugin file.   if ( ! wp_next_scheduled( 'xls_func_hook1' ) ) {   wp_schedule_event( time(), 'hourly', 'xls_func_hook1' ); }  add_action( 'xls_func_hook1', 'sendxls1' ); //senxls1 is a function in functions.php if ( ! wp_next_scheduled( 'xls_func_hook2' ) ) {    wp_schedule_event( time(), 'hourly', 'xls_func_hook2' ); } add_action( 'xls_func_hook2', 'export2excel' );   The full code is at Conjugate subgroup strictly contained in the initial subgroup? Let $G$ be a group, $H\subseteq G$ a subgroup and $a\in G$ an element of the group. Is it possible that $aHa^{-1} \subset H$, but $aHa^{-1} \neq H$?   If $H$ has finite index or finite order, this is not possible. 'locate' command in terminal. Why is it so fast? How can I stop being prompted to unlock the 'default' keyring on boot? Whenever Ubuntu boots up, a dialogue pops up asking me to unlock my default keyring. Is there some way this can unlock automatically through PAM or some other magical way? Is it possible to embed a scrollable frame inside a PDF? (This is an end-of-year crazy question)   Is it possible to embed a (scrollable) frame or a PDF inside a PDF? If so, how to do it in (pdf)LaTeX?  This is something pretty common in HTML (see for example ). Here it is a webpage with PDF frames   Here it is a fake screenshot so you get the idea.  Portable and non-portable (e.g. only-Acrobat) answers are welcomed.     Example of a down arrow below a frame. The up arrow can be on top of the frame and the triangles point up. I want to make a schematic of this board. Can anyone tell me how? I have an Ubuntu machine that I'm using as my home Internet router.  It uses a USB mobile broadband modem as its Internet connection, and shares this with another router (via the router's "Internet" port) which I use as my LAN.  How do I redirect requests from within my LAN for a given URL to a custom IP address (ex have google.com redirect to x.x.x.x)? How do I backup all files? (.dbus and dconf backup problems) What are /home/user/.cache/dconf and /home/user/.dbus? Why does their backup fail?  I tried following  (see code below) but while it allowed me to backup the above files, now I am told it couldn't backup /home/[user]/.dbus/session-bus.    $ man chown $ sudo chown user .cache/dconf   [sudo] password for user:  $ sudo chown user .dbus $ man chgrp $ sudo chgrp user .cache/dconf $ sudo chgrp user .dbus   How do I fix it so it will not take my time closing an error message after each backup? Should I exclude these folders ? Why are they not needed? Why would someone want to back them up? Limiting Length of Input in JTextField is not working When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it. My proof is very different from my reference, hence I am wondering is I got this right?  Apparently, $F$ is continuous, and the identity matrix is closed. Now we want to show that the preimage of continuous function on closed set is closed.  Let $D$ be a closed set, Consider a sequence $x_n \to x_0$ in which $x_n \in f^{-1}(D)$, and we will show that $x_0 \in f^{-1}(D)$.  Since $f$ is continuous, we have a convergent sequence $$\lim_{n\to \infty} f(x_n) = f(x_0) = y.$$  But we know $y$ is in the range, hence, $x_0$ is in the domain. So the preimage is also closed since it contains all the limit points.  Thank you. as of 4/2015 OS X Kindle App: Where are the books located? After I updated my Kindle for Mac app 2 mos. ago I can no longer find the azw book files on my Mac to convert them so I can read them on my KOBO ereader. I use to find them in a My Kindle Content file but that has disappeared. I have Ult. DRM &amp; Calibre but they won't work without the azw files, and I can't find them on my mac anymore. Can anyone help me? The answers on this site about this are years old &amp; do not apply to my problem. How to find $\mathbb{E}(X\mid\mathbf{1}_{X<Y})$ where $X,Y$ are i.i.d exponential variables? Given that $X,Y\stackrel{\text{i.i.d.}}{\sim}\text{Exp}$ with mean $\lambda(&gt;0)$ and $Z=\mathbf{1}_{X&lt;Y}$, what is $\mathbb{E}(X\mid Z=z)$ ?   We have $Z=1$ with probability $\Pr(X&lt;Y)$ and $Z=0$ with probability $1-\Pr(X&lt;Y)$.   But $\Pr(X&lt;Y)=\frac{1}{2}$ as $X$ and $Y$ are i.i.d. random variables.   Does this mean I can simply say that $Z\sim\text{Ber}\left(\frac{1}{2}\right)$ ?   Then, $\mathbb{E}(X)=\mathbb{E}(X\mid Z=0)\times\frac{1}{2}+\mathbb{E}(X \mid Z = 1) \times \frac{1}{2}$  $\implies2\lambda=\mathbb{E}(X\mid Z=0)+\mathbb{E}(X\mid Z=1)$.   But I cannot conclude anything from here. I couldn't find the conditional distribution of $X\mid Z$ either. Maybe I have to condition on another variable $U$ so that $\mathbb{E}(X\mid Z)=\mathbb{E}\,[\mathbb{E}(X\mid Z,U)\mid Z]$.