We have some 20 machines in the LAN and 3 NAS boxes mounted on all the devices. I want to permanently umount one NAS box from all the machines. I can do the manual way... SSH to each machine umount the NAS and remove the entry from fstab. Any automated way ?  ( I can write a python fab file, but wanted to know if there is any default Linux way.)
I am trying to automate these steps so that I don't need to do this on every machines manually. I need to install latest app server software (abc.tar.gz) on all the unix boxes.  I need to do this in around 12 machines - "machine1" ... "machine12". I have a master machine "machine0" which has abc.tar.gz file so I was thinking to run my script from this machine only and install abc.tar.gz software by following below steps in all those 12 machines one by one. My unix account id is david and my process runs as golden user.  This is the steps I follow if I am installing abc.tar.gz in "machine1":  david@machine1:~$ sudo scp david@machine0:/home/david/abc.tar.gz . david@machine1:~$ sudo stop test_server david@machine1:~$ sudo su - golden golden@machine1:~$ cd /opt/process golden@machine1:/opt/process$ rm -rf * golden@machine1:/opt/process$ exit david@machine1:~$ sudo cp abc.tar.gz /opt/process david@machine1:~$ sudo chown -R golden /opt/process david@machine1:~$ sudo su - golden golden@machine1:~$ cd /opt/process golden@machine1:/opt/process$ tar -xvzf abc.tar.gz golden@machine1:/opt/process$ exit david@machine1:~$ sudo start test_server   How can I automate this so that it can do the same steps in all 12 machines one bye one? I mean install abc.tar.gz in machine1 first, then install on machine2 and go on..  I want to run this script from machine0 only.  Is there any way to automate this?
Random test data: How to do it right? Several months ago I started an experiment in test automation. Each test, before it starts, picks up random test data. For instance, when my test requires a user with administration privileges, I draw a random account and then I from a group of admin users for this account I draw a random admin user.  The reason for using random test data was two-fold:    First, when we were using static, i.e., hard-coded test data, sometimes tests started to fail, because test data no longer existed in DB, e.g., a user has been removed from the database (we're having production dump in our test DB, so I guess the user has been deleted in production). When we started to find such users at runtime, the problem disappeared.  Second problem was that it was not really clear why certain test data were used for a certain test. We have inherited tests from the other team and couldn't understand their intentions behind, for instance, using user "xyz@awesome.com". By writing queries to find data, we started to explicitly state what type of test data we want, e.g., that we want a user with administration privileges.   While my approach solved both problems, it introduced also some new issues:   Tests occasionally fail, because they pick up wrong test data. This is because queries are sometimes incorrect. For instance, once a test drawn a random account that had no administrators at all. Good thing about that is that this way I keep learning new things about the system under tests, e.g., that there must be business reasons to have accounts without administrators. Test setup becomes more and more complex, as queries start to grow and thus tests seems now a bit more complex to understand.   I was also hoping to increase coverage and find more bugs by using random test data just like it is done in fuzz testing. Instead, I mostly found bugs in my test and learned how little I know about the system under test. Finally, ROI doesn't seem big. Before the change there was a cost of maintaining static test data (updating test data if they were outdates). Now I have to maintain complex queries when the test takes "wrong" test data and this tends to occur more often than outdating of static test data previously.  I wonder whether using random test data really makes sense and how to do it right? How do I figure out if someone is a first cousin, second cousin, cousin once-removed, etc? What oil is best for seasoning a cast-iron skillet Orthogonality and linear independence [Theorem] Let $V$ be an inner product space, and let $S$ be an orthogonal subset of $V$ consisting of nonzero vectors. Then $S$ is linearly independent.     Also, orthogonal set and linearly independent set both generate the same subspace.  (Is that right?)    Then orthogonal $\rightarrow$ linearly independent but orthogonal $\nleftarrow$ linearly independent is that right?    One more question. For T/F, Every orthogonal set is linearly independent (F) Every orthonormal set is linearly independent (T) Why? Is there any way to do a correct word count of a LaTeX document? Often assignments (or even papers) have a word count limit. That is not a big deal when using Word, but I don't know how to do that using LaTeX. My solution has been so far to compile the document and then do a rough word count of my pdf file, sometimes even copying the contents of the pdf file and pasting in Word to get a mostly correct Word count.  Is there any tool (maybe even an online tool), package, script or software to do that directly from my .tex document and still get the right word count (i.e., ignore commands, equations, etc)? Twice today I noticed that my reputation increases with 15 on Stack Overflow, but when I click to see my account, the change is being reverted and none of my recent answers are marked as accepted. Then why does the reputation on the top of the page change ? I have a number of tiff files named:    sw.001.tif sw.002.tif ...   and I want to remove the .tif at the end of each of the files.  How can I use the rename command to do this? I'm running a VPS of a german provider and want to switch from Ubuntu to CentOS. There I tried to install firewalld (was not preinstalled), but it always fails with the error  ERROR: Failed to load nf_conntrack module: modprobe: ERROR: could not find module by name='nf_conntrack' modprobe: ERROR: could not insert 'nf_conntrack': Function not implemented modprobe: ERROR: Error running install command for nf_conntrack modprobe: ERROR: could not insert 'nf_conntrack': Operation not permitted   Obviously the nf_conntrack kernel module was not found. Since this is a VPS, I cannot tinker with the kernel modules. On the support site of my provider I found a list of available kernel modules, for example:  ip_conntrack_netbios_ns ipt_conntrack    ip_conntrack    ip_conntrack_ftp    ip_conntrack_irc   Since nf_conntrack is not listed here, does that mean, that I cannot use firewalld? Is it possible to run it without this module?  I guess I could use iptables, if I wanted to (it seems to run correctly). But as I have more experience with firewalld, I would like to stick with it.    CentOS Linux release 7.7.1908 (Core)  uname -a: Linux xxxxxx.xxxxxxxx.xxx 3.10.0-042stab140.1 #1 SMP Thu Aug 15 13:32:22 MSK 2019 x86_64 x86_64 x86_64 GNU/Linux $A$ is an $n\times n$ matrix of complex numbers. Prove that if $\lambda$ is an eigenvalue of $A^2,$ then $\sqrt{\lambda}$ or $-\sqrt{\lambda}$ is an eigenvalue of $A.$    If $\lambda$ is an eigenvalue of $A^2,$ we have $\lambda\alpha=A^2\alpha$ for some $\alpha.$ Then how can we find a $\beta$ s.t. $\sqrt{\lambda}\beta=A\beta?$ How do you make sure email you send programmatically is not automatically marked as spam? Can $X$ have compact connected components? Let $X$ be a Hausdorff, locally compact but non-compact topological space. If the (Alexandroff) one-point compactification is connected, can $X$ have compact connected components? Divergent infinite series $n!e^n/n^n$ - simpler proof of divergence? $$ \sum_{n=1}^\infty \frac{n!e^n}{n^n} $$ Where $e$ is Euler's number.  Recently on calculus class we were covering convergence tests and my group got stuck with this infinite series. Our calculus teacher told us that it diverges but he doesn't see any elementary way or simple test to prove it. He told us something about Euler's Gamma function and said that he knows it diverges because of Stirling's formula but this is not quite our level yet.  I tried to think about it myself but I established only that this  is some kind of an edge case. We could generalize the problem to series of $\frac{n!a^n}{n^n}$. Then, from the ratio test we know that it converges for $a &lt;e$ and diverges for $a&gt;e$. For $a=e$ the test is inconclusive. I've also tried to compare it with various divergent series, but nothing worked...  Does anybody have any idea for a simple solution? Saving memoization to disk Is it safe to answer "erase disk and install Ubuntu" on a virtual machine? I would like to know if it's possible to win in Don't Starve? Or is it just the matter of how long until you die? If dark matter only interacts with gravity, why doesn't it all clump together in a single point? I'm a complete layperson. As I understand, dark matter theoretically only interacts with the gravitational force, and doesn't interact with the other three fundamental forces: weak nuclear force, strong nuclear force, and electromagnetism.  Those are my understandings going in. If I'm wrong, please correct me. I've done some googling, and I haven't found anything confirming or denying that dark matter is affected by either of the fundamental nuclear forces.  So since dark matter only interacts with gravity, what causes any dark matter particle to be repelled from another? If they can pass freely through each other, and they are gravitationaly attracted to each other, why don't such particles clump together in a single 'point' in space?   It seems to me that particles occupying a single 'space' are philosophically not distinct particles, but I don't know how actual physics would play into this.  Edit , author's credentials unknown, but implicitly claims to be a physicist or astronomer, says "...[P]hysicists generally take all dark matter to be composed of a single type of particle that essentially interacts only through gravity."  Edit 2 The author is this , "Professor of Science on the physics faculty of Harvard University." Problem with >> inside of \tt I have an inline code example with a nested Java generic declaration, using the typewriter typeface. However, the closing &gt;&gt; is rendering as a black box. A cursory Google search suggested $&gt;&gt;$, but this removes the typewriter font. Using \textgreater in place of the actual &gt; also encounters the same problem. Here is the offending snippet:  ...declaration {\tt List&lt;Map&lt;Integer, String&gt;&gt;} is...   Any ideas? Viewshed Analysis With GDAL I am looking to perform a simple (one observer location) viewshed analysis on a standard DEM using GDAL (either python or .NET bindings).  I have searched, but haven't found any readily available implementation.  Can anyone point me in the right direction? How To: Execute command line in C#, get STD OUT results Python, Unicode, and the Windows console When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).