Occasionally I want to cd into a directory where my user does not have permission, so I resort to sudo.  The obvious command sudo cd somedir doesn't work:  $ sudo mkdir test $ sudo chmod go-rxw test $ ls -l drwx------ 2 root     root  [...snip...] test $ cd test -bash: cd: test: Permission denied $ sudo cd test sudo: cd: command not found   Using sudo su works:  $ sudo su # cd test   Is it possible to make this into a one-liner? (Not a big deal, just idle curiosity :)  The variations I tried didn't work:  $ sudo "cd test" sudo: cd: command not found $ sudo -i cd test -bash: line 0: cd: test: No such file or directory $ sudo -s cd test   The last one doesn't give an error, but it cd's within a new shell that exits by the end of the line, so it doesn't actually take me anywhere.  Can someone enlighten me as to why this happens? Why is sudo cd not found, when for example sudo ls ... works fine?
I tried to use sudo cd name_of_dir but am getting the error message:   sudo: cd: command not found   Is there any other way to enter a directory owned by another user which has 700 permission?
Coloring lines inside textarea Some examples include:     We fear the damned.   He honored our fallen.   This is a given.   You are the chosen.   The lost were among us.   They obey the venerated.   My beloved kissed me. (TIL “beloved” is a verb thanks to RegDwight АΑA)   Is there a word to describe the past participle used as a noun? I’m hesitant to refer to it as a gerund, since it doesn’t end in -ing. Another possibility is adjectival noun, if you originally treat the word as a participle (e.g. “the damned man”) that has given up its modified noun.  Also, why does English tend to preface such nouns with the? Resetting Ubuntu to factory settings I've had a lot of problems lately and now I'm having problems logging in at the login screen. I'm giving up and just want to reset and start over. How can I "factory reset" Ubuntu, in this situation, or, for future reference, in general? iPhone 4 water damage - how to recover data? Is the oil thrown on a creature consumed when it's dealt fire damage and lit? I had the idea of throwing oil flasks on enemies at level 1, then hitting them with a torch to deal a bunch of bonus fire damage.  PHB 152:     If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil.   PHB 152:     If you make a melee attack with a burning torch and hit, it deals 1 fire damage.   A flat 6 fire damage is pretty potent at level 1, but does the oil remain or does it burn out in a flash when hit (since it has no damage over time) when hit?  If not there is potential for a dual torch wielding PC to throw down 12 fire damage per round, or for multiple PCs to deal 6 damage per torch per PC per round. No Badge Progress color for Golden Badges? How to prove that you have significant ties with family in your home country? How can I prove the immigrant officers that I have significant ties in my home country?  Are there any documents that I need? Sending a message to nil in Objective-C As a Java developer who is reading Apple's Objective-C 2.0 documentation: I wonder what "sending a message to nil" means - let alone how it is actually useful.  Taking an excerpt from the documentation:     There are several patterns in Cocoa   that take advantage of this fact. The   value returned from a message to nil   may also be valid:         If the method returns an object, any pointer type, any integer scalar   of size less than or equal to   sizeof(void*), a float, a double, a   long double, or a long long, then a   message sent to nil returns 0.   If the method returns a struct, as defined by the Mac OS X ABI Function   Call Guide to be returned in   registers, then a message sent to nil   returns 0.0 for every field in the   data structure. Other struct data   types will not be filled with zeros.   If the method returns anything other than the aforementioned value   types the return value of a message   sent to nil is undefined.      Has Java rendered my brain incapable of grokking the explanation above?  Or is there something that I am missing that would make this as clear as glass?  I do get the idea of messages/receivers in Objective-C, I am simply confused about a receiver that happens to be nil. Are hand motions required to use the Force? In almost every canon (that is, visual) source, Force users typically wave a hand to invoke the Force to move or manipulate objects, people and thoughts. I get out-of-universe this is a visual cue that the Force is being used, but in-universe is it strictly necessary?  (The only exception I can think of is when Luke is training on Dagobah and is balancing rocks while standing on one hand with Yoda on his foot. He doesn't appear to be waving his hand to move the rocks.)  Is this addressed anywhere in-universe, even in Legends? While writing a proposal at work today I needed to mention a list of things and within that list were multi-part items. It seems like replacing the comma with a semi-colon in this situation would make the sentence easier to understand, but is it correct usage?  With standard punctuation this could get confusing:       Some of my favorite things to do are   camping, playing football and   baseball, watching Laurel and Hardy   Movies, and traveling.   Proposed alternative. Is this acceptable usage?       Some of my favorite things to do are   camping; playing football and   baseball; watching Laurel and Hardy   Movies; and traveling. I can't seem to find info on installing a Swedish language package on my machine. The language is not listed  and the hits on Google I got led nowhere (or, rather, to the said page).  Where can I ask such a question (within the realm of Stack Exchange)? I came across this strange code snippet which compiles fine:  class Car {     public:     int speed; };  int main() {     int Car::*pSpeed = &amp;Car::speed;     return 0; }   Why does C++ have this pointer to a non-static data member of a class? What is the use of this strange pointer in real code? Displaying equations, how to combine strings and values without evaluating everything. Creating controls within a Loop I have have some code which adds new cells to a table and fills them with text boxes.   The way I've coded it so far works fine:          TableCell tCell1 = new TableCell();         TableCell tCell2 = new TableCell();         TableCell tCell3 = new TableCell();         TableCell tCell4 = new TableCell();         TableCell tCell5 = new TableCell();         TableCell tCell6 = new TableCell();         TableCell tCell7 = new TableCell();          TextBox txt1 = new TextBox();         TextBox txt2 = new TextBox();         TextBox txt3 = new TextBox();         TextBox txt4 = new TextBox();         TextBox txt5 = new TextBox();         TextBox txt6 = new TextBox();         TextBox txt7 = new TextBox();          tCell1.Controls.Add(txt1);         tCell2.Controls.Add(txt2);         tCell3.Controls.Add(txt3);         tCell4.Controls.Add(txt4);         tCell5.Controls.Add(txt5);         tCell6.Controls.Add(txt6);         tCell7.Controls.Add(txt7);          tRow.Cells.Add(tCell1);         tRow.Cells.Add(tCell2);         tRow.Cells.Add(tCell3);         tRow.Cells.Add(tCell4);         tRow.Cells.Add(tCell5);         tRow.Cells.Add(tCell6);         tRow.Cells.Add(tCell7);   As you can see there's basically 4 instructions getting repeated 7 times. I'm sure there has to be a way to accomplish this with just 4 lines of code within a FOR loop and having all the names dynamically assigned but I just can't seem to find anything that would point me in the direction of how to do it.  Something like the following is what I'm after:      for (int i = 0; i &lt; 6; i++)     {          TableCell tCell[i] = new TableCell();         TextBox txt[i] = new TextBox();         tCell[i].Controls.Add(txt[i]);         tRow.Cells.Add(tCell[i]);      }    Any help would be much appreciated. "Requires 50 reputation" to comment on deleted posts Admin privileges requiring for installing a package build though Packages Using osx 10.9 and packages for making package installer.  While installing a package made using Packages in /Applications location on a osx 10.9 machine, installer is asking for Admin password. Even though I had unchecked 'Require admin password for installation' while package making.  So, how to avoid this i.e a non-admin user should install this package. Package should install in /Applications location, so that non-admin user can use the app.  I check  and Every issue of Ubuntu LTS since 8.04, I have made a Full install of Ubuntu to USB flash drive, and recorded each step..  This has been intended to make a guide/check list for users wishing to create Full install bootable flash drives.  Previously the procedure worked for BIOS boot if created in BIOS and for UEFI boot if created in UEFI.  This year for 20.04 the instructions should work for both creating and running the drive booted from either BIOS or UEFI.  The question is:  How to Create a Full Install of Ubuntu to USB device with Step by Step instructions that work in either BIOS or UEFI. Utopia of children brought up by robots I am looking for the title of a science-fiction book describing a colony (utopia) on another planet that has been established as a social experiment. The inhabitants had been brought up only by robots and therefore work perfectly as a society. I think there is no formal government and people work on what they are interested. If any catastrophe happens, they are able to form groups of specialists who react to the threat. Later there comes a group of outsiders who decide to join and live in the utopia. I am not sure, but author was probably Canadian. Some prestigious universities like Caltech, Stanford, MIT and Berkeley never disclose their information regarding their cut off major and cumulative GPA for M.Sc and PhD programs in engineering. I also aware of the fact that graduate schools will look at the whole package and make their decision based on sets of factors like letter of recommendation, statement of purpose as well as GPA.   However, since application fee is pretty high it is not worth it to apply to schools that you know you have a slight chance of getting into it so, I would like to know what would be the acceptable GPA (Both major and Cumulative) for applicants to be competitive for top five schools in the world? Suppress system() output