Deleting read-only directory on linux? I created an empty read-only directory: mkdir -m 400 ~/Desktop/hello  As per the octal permission, it indicates the directory has read only permission. But contrast to that when I am using the following command the directory was deleted: rmdir ~/Desktop/hello  How is this possible to delete the directory when it is read only?
Why can rm remove read-only files? If I create a file and then change its permissions to 444 (read-only), how come rm can remove it?  If I do this:  echo test &gt; test.txt chmod 444 test.txt rm test.txt   ...rm will ask if I want to remove the write-protected file test.txt. I would have expected that rm can not remove such a file and that I would have to do a chmod +w test.txt first. If I do rm -f test.txt then rm will remove the file without even asking, even though it's read-only.   Can anyone clarify? I'm using Ubuntu 12.04/bash.
Calculate $\sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k}$ How can I view the contents of tar.gz file without extracting from the command-line? I want to see the contents (list of files and folders) of an archive, for example a  tar.gz file without extracting it.  Are there any methods for doing that? Arguments for/against same birthday for siblings? My son is born on October 1st three years ago. My wife is pregnant again and the calculated delivery date is October 22nd. Both children are boys, 3 years apart. We might end in a situation where the delivery is earlier, for reasons irrelevant to this question.   I believe that around their birthdays is the only time in the whole year that the actual date matters. It really does boil down to practical considerations around patience (gifts) and planning. I think that if there is, say, a week or more between the birthdays then it's easy to separate but if the difference is only a very few days then it gets complicated, and that's the situation I'd like to avoid.  I know from friends that having the same birthday makes events easier to plan, from the parents' perspective. It would also remove the unhappiness of a small child saying "why does he get presents today and I don't." Being a twin, and married to one, I know that there's nothing problematic in sharing a birthday as long as both get their fair share of attention.    What are practical arguments for, and against, choosing the same birthday for the second child? What considerations apply when the second child's birthday is only a very few days after the elder sibling's? I have a video clip of a car driving by from left to right. My goal is to add a decal (mask) to the car door.  Right now I am painstakingly moving the mask via X and Y. how to install drivers for wifi adaptor Ralink 148f:7601 on ubuntu? Unity doesn't load, no Launcher, no Dash appears trying to install Astromenace on my linux mint 14 cinnamon pc so i am following this tutorial as it is the only one i can find and any that i can find are the same as this one:    but when i type in the first command i gives me this  myname@myname-System-Product-Name ~ $ sudo wget -q -O- http://archive.getdeb.net/getdeb-archive.key | apt-key add - [sudo] password for myname: ERROR: This command can only be used by root. How to write special set notation by hand? Understanding the formula for the Confidence Interval of the difference between two sample proportions Who paid for Harry's Nimbus 2000? The Nimbus 2000 was the fastest broom at the time of the Harry's first year at Hogwarts.  Professor McGonagall wanted to win the Quidditch Cup so she spoke with Dumbledore and got an exception from the rule that no first-years could have a broom for Harry.  My question is who paid for the broom?  It couldn't have been a cheap broom.  They wouldn't have taken gold out of Harry's Gringotts account without permission.  It wouldn't be right for the school to pay for it and I doubt McGonagall paid for it out of her own pocket.  So who paid for the broom? Detecting pattern at the end of a line with grep Prove that: $2^a+3^b<3a+4b$ I bought a three months membership for PlayStation Plus some time ago. This membership has already expired. While it was active, I got the classic PSOne Resident Evil titles for free. Will I be able to re-download them now without having to purchase a new PSPlus membership? The sum $\sum_{k=1}^nk(k!)$ can be easily calculated by noting $k(k!)=(k+1)!-k!$. Is there a way to calculate the sum nicely using a combinatorial argument. Is it possible to notice it is $(n+1)!-1$ combinatorially? If $U_1$, $U_2,\ldots,U_n$ are proper subspaces of a vector space $V$ over a field $F$, and $|F|\gt n-1$, why is $V$ not equal to the union of the subspaces $U_1$, $U_2,\ldots,U_n$? I've been using Ubuntu for a few years now, but I just installed Version 16.04, and I've been having a lot of issues. I'm not a command line expert, but I tried to install some software last night, and it is creating issues (and also not working properly).   When I run sudo apt-get -f install, I see the following message:  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   lua-event lua-expat lua-filesystem lua-sec lua-socket lua5.1 prosody Suggested packages:   lua-zlib lua-dbi-postgresql lua-dbi-mysql lua-dbi-sqlite3 The following packages will be REMOVED:   jitsi-meet-tokens The following NEW packages will be installed:   lua-event lua-expat lua-filesystem lua-sec lua-socket lua5.1 prosody 0 upgraded, 7 newly installed, 1 to remove and 22 not upgraded. 3 not fully installed or removed. Need to get 0 B/413 kB of archives. After this operation, 2,296 kB of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 176266 files and directories currently installed.) Removing jitsi-meet-tokens (1.0.962-1) ... dpkg: error processing package jitsi-meet-tokens (--remove):  subprocess installed post-removal script returned error exit status 10 Errors were encountered while processing:  jitsi-meet-tokens E: Sub-process /usr/bin/dpkg returned an error code (1)   Can someone help me figure out what I need to do to get this resolved? I'm fine with deleting jitsi, but I'm not sure if that will correct the problem.   Currently there is a red circle with a line through it in the upper right corner that indicates there may be installed packages with unmet dependencies. opengl storing multiple indices into indices buffer After parsing collada files I found out that we have to load two(or more) indices each pointing to say a vertex or normal etc. like this (&lt;p>3 0 2 0 0 0&lt;/p>)  Is there a way to load (and use)these indices to indices buffer(ELEMENT_ARRAY_BUFFER) like this (vnvnvn...) ; where v is vertex pointer, n is normal pointer from the above. with vertices loaded to VBO1 like (vvvv...) and in VBO2 like (nnnn...). So that we dont have to repeat the normals in VBO2.  VBO like (vnvnvn...) is also ok. (and not something like this ), I'm not trying to use multiple indices buffer. I'm trying to put all the given indices into one index buffer and use them alternately.  (If I wasnt clear i will try for more clarification.) One part of the render layer glowing? In the following setup, does method B run in a (new) transaction?  An EJB, having two methods, method A and method B  public class MyEJB implements SessionBean     public void methodA() {        doImportantStuff();        methodB();        doMoreImportantStuff();     }      public void methodB() {        doDatabaseThing();     } }   The EJB is container managed, with methodB in requires_new transaction, and method A in required transaction. thus:  &lt;container-transaction id="MethodTransaction_1178709616940"&gt;   &lt;method id="MethodElement_1178709616955"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;*&lt;/method-name&gt;   &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;   &lt;/method&gt;   &lt;method id="MethodElement_1178709616971"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;methodB&lt;/method-name&gt;   &lt;/method&gt;   &lt;trans-attribute&gt;RequiresNew&lt;/trans-attribute&gt; &lt;/container-transaction&gt;   Now let another EJB call methodA with an EJB method call. methodA now runs in an transaction. Will the subsequent call to methodB from methodA run in the same transaction, or does it run in a new transaction? (mind, it's the actual code here. There is no explicit ejb-call to method B) Why is it dangerous to initialize weights with zeros? Is there any simple example that demonstrates it?