I would like to append some commands to ${HOME}/.bashrc file.  I made a script to do it.  # file name : setup_bash bashrc_path="${HOME}/.bashrc" comment="test" sudo echo "${comment}" &gt;&gt; "${bashrc_path}"   and run it by  bash setup_bash   And it results in an error.  setup_bash: line 19: /home/user/.bashrc: Permission denied   line 19 is at (sudo echo ...).  Next I tried the following code,  sudo bash setup_bash   It results in success.  What is the difference of them? Please teach me it.
This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux.  There are a lot of times when I just want to append something to /etc/hosts or a similar file but end up not being able to because both &gt; and &gt;&gt; are not allowed, even with root.  Is there someway to make this work without having to su or sudo su into root?
Everytime I try to sudo something at the terminal, I get a warning message:  alexandre@XPS-15Z $ sudo mount file.iso /mnt/ -o loop [sudo] password for alexandre:  no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory   It's just annoying to get that all the time. How do I solve that? I'm on Ubuntu 14.04 (upgraded from 13.10) How do you find out your very first chat in a particular chatroom? I want to know my very earliest/first chat post in a chatroom. Is there perhaps a way to search/view all my posts and sort the results? Set Windows process (or user) memory limit Is there any way to set a system wide memory limit a process can use in Windows XP? I have a couple of unstable apps which do work ok for most of the time but can hit a bug which results in eating whole memory in a matter of seconds (or at least I suppose that's it). This results in a hard reset as Windows becomes totally unresponsive and I lose my work.  I would like to be able to do something like the /etc/limits on Linux - setting M90, for instance (to set 90% max memory for a single user to allocate). So the system gets the remaining 10% no matter what. Comparing two byte arrays in .NET Taxonomy terms view sorting results numerically I have a taxonomy that's comprised entirely of numeric term names, 1 through 1200 (with a few numbers missing in between). I created a new "Taxonomy terms" view to show all terms in this vocabulary. When I look at the view results, I'd like to see the terms sorted numerically, however the view is displaying the terms alphabetically. I understand the reason for this is because term names are strings, but I'm hoping someone has an answer of how to make the query treat the term names as integers.  Here's an example of the view results as they are displayed now:   1 10 100 1000 1001 1005 101 1014 1015 1016 1019 102 1020 1024 103 1034 104   Normally in MySQL, you could write SELECT name FROM {taxonomy_term_data} ORDER BY CAST(name AS UNSIGNED). Is there a way to get this same type of CAST() happening in views? Quoting in ssh $host $FOO and ssh $host "sudo su user -c $FOO" type constructs I often end up issuing complex commands over ssh; these commands involve piping to awk or perl one-lines, and as a result contain single quotes and $'s.  I have neither been able to figure out a hard and fast rule to do the quoting properly, nor found a good reference for it.  For instance, consider the following:  # what I'd run locally: CMD='pgrep -fl java | grep -i datanode | awk '{print $1}' # this works with ssh $host "$CMD": CMD='pgrep -fl java | grep -i datanode | awk '"'"'{print $1}'"'"   (Note the extra quotes in the awk statement.)  But how do I get this to work with, e.g. ssh $host "sudo su user -c '$CMD'"?  Is there a general recipe for managing quotes in such scenarios?.. Will my 320W PSU handle a Asus GTX 750Ti I've got a 320W PSU as far as I know and it's a Chinese PSU because I've seen the Chinese letters on it. I just had a question if I can upgrade my pc to Asus GTX 750Ti 2 GB OC.  My pc specs are:   4GB DDR3 RAM Intel Core 2 Duo E8400 3.0 GHZ 250GB HDD Onboard graphics card how to find $|GL_2(F_p)|$ I need to find $|GL_2(F_p)|$, I am very very uncomfortable in counting, so please help here I proceed,  $\begin{pmatrix}a&amp;b\\c&amp;d\end{pmatrix}$ be such an invertible matrix, so we need and sufficient that $ad\neq bc$, so if i chose all non zero $a,b,c$ arbitrarily and chose $d\neq a^{-1}bc$ and form matrices then the cardinality   will be $(q-1)^3\times (q-2)$, well now if one of $a,b,c,d$ be zero then other three can be anything nonzero so in this case cardinality will be $4(q-1)^3$, so finally if two entries are $0$ then they must be opposite to each other i.e diagonally, but other two must be nonzero, so cardinality in that case $2(q-1)^2$, so total number is just sum of three cases. Why does chmod 777 -R / leave the system unusable? On really old Ubuntu 6.06 - How to upgrade I'm on an old Ubuntu version (Ubuntu 6.06.2 LTS Server) which isn't really supported any more. So the automatic updates don't work. I have ISPConfig installed to manage a few web sites.  What's the best course of action? I'd like to upgrade to something current, but I can't figure out how to go about doing this, given that the apt-get scripts don't really work any longer. Is it possible to have the dock in different positions in different desktop? Is it possible to have the dock in different positions in different desktops? In particular I'd like to change the settings between a normal desktop and a desktop where there's an app at full screen. In this way I'd keep the dock in lower side of the desktop when there's an app at full screen and vertically on the left side during normal use.  I have this problem that, sicne I usually have the dock vertically on the left, it pops out everytime i go to the far left in an app I'm using with full screen, and using this app I have to move the mouse to the left quite often. When I place a multipage pdf file into InDesign CC, the pages go outside of my document settings, making this function useless.  What do I have to do to make the placed  pdf pages go within my document settings, which in this case is 11 in. Length X 8.5 in. width, .5 in. margins on all sides, with two columns per page. I would greatly appreciate an answer to this, Thank you. The momentum-space fermion propagator in the free Dirac theory is given by       The arrow on the fermion propagator is said to represent the flow of charge.  How can we derive this statement quantitatively from the Dirac Lagrangian?  What is the quantitative form of the charge being referred to here? In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)? Merging arrays with the same keys There's a fairly standard two or three-semester curriculum for introductory quantum field theory, which covers topics such as:   classical field theory background canonical quantization, path integrals the Dirac field quantum electrodynamics computing $S$-matrix elements in perturbation theory, decay rates, cross sections renormalization at one loop Yang-Mills theory spontaneous symmetry breaking the Standard Model   What is a good, complete and comprehensive book that covers topics such as these? I want to know if there is a way to switch to console mode from the boot menu.  I have an NVIDIA 1070 and every time there is an update, the GUI stops working. All I need to do is re-install the drivers; however, to do that I need to be in console mode. EDIT: I should have added more information to this question but I'll comment on all answers. In short: I've tried text instead of quiet splash I do see booting activity in text mode; however, I don't get a login screen and ctrl + Alt + F1 doesn't help because GDM keeps trying to restart. Previously I managed to kill GDM through multiple tries but is not working since the latest update. EDIT: After searching for runlevel, I've found  but I think it required me to have a running system to make changes -- please correct me if I'm wrong. Are Lorentz transformations linear transformations? My textbook says that Lorentz transformations are linear transformations and present them as matrices. Lorentz transformations relate different coordinate systems with each other. It seems that coordinate systems are linear spaces, but coordinates are just labels for spacetime points, with no other structures attached. So what is the linearity all about? Find the volume inside the paraboloid $x^2+4z^2+8y=16$ and on the positive side of xz-plane No answer was given for this question, so wanted to confirm my answer. Steps followed for solving:  V=$4\int_0^2\int_0^{\sqrt{16-4z^2}}(2-\frac{x^2}{8}-\frac{z^2}{2})dxdz$  After solving this I got V = $8\pi$. Is this answer correct? Why disable Fast Boot on Windows 8 when having dual booting? Why is everybody keep mentioning to disable Fast Boot on Windows 8 if you have installed alongside Ubuntu? Is it something that is recommended only for UEFI machines or is it a suggestion for Legacy BIOS machines as well? Is it because it makes the Windows partition inaccessible from Linux or there is another more serious reason to disable it?