Cool, See having a commandline UNIX specialist at the LUG really helps those of use that mostly use the GUI to understand those times when we really need to use the console. I guess we should use commandline more, but then I was untill recently a die-hard windows fan.
On another note..... I thought about a good (ok maybe not that good) idea for a thing we can do at maybe the next lug meeting. a VIM Competition!!!! (vi improved) Hell yeah!! I need to see if theres some pre-prepared VIM (vi improved) exercises out on the net, we can all sit down and do them together, first one to finish with the correct output, gets all the coffees in and gets a free biscuit!! VI skills are importnat with unix and linux (less so where theres an option for a gui editor in linux) but even so the skill is important to have and we should do something VI based every so often just to keep on our toes... ...who's up for it? Regards Richard On 05/09/07, Mark Rogers <[EMAIL PROTECTED]> wrote: > > I gather I missed a conversation last night about "sudo cd" being broken > on one of the boxes being played with (command not found). > > For those confused by this, I'll start by saying that this is not > broken, then ask you to think about what "sudo cd" would mean if it did > work. > > Suppose /root is a directory you're not allowed access to except as a > super user. Then > sudo /root/somecommand > .. would correctly run somecommand as the root user, and > sudo ls /root > .. would list files in /root. However > sudo cd /root > .. would fail. > > In all cases you're asking sudo to run a command as root then return you > to the non-privileged user once complete. Running somecommand as root > makes sense, but if "cd" had worked then as soon as the command had > completed you'd be left as a non-privileged user in a directory you have > no rights to be in. Therefore cd in this context is meaningless, and > doesn't work. > > It is doubtless true that the error message is misleading and unhelpful, > though. > > In the rare occasions where this is a problem, > sudo bash > or > sudo su > .. will change your session to that of the root user, allowing you to cd > anywhere, and (of-course) to screw up your system in all sorts of ways > not possible when you were a non-privileged user. > > A Google search for "sudo cd" will explain all this better. > > -- > Mark Rogers // More Solutions Ltd (Peterborough Office) // 0845 45 89 555 > Registered in England (0456 0902) at 13 Clarke Rd, Milton Keynes, MK1 1LG > > > _______________________________________________ > Peterboro mailing list > [email protected] > https://mailman.lug.org.uk/mailman/listinfo/peterboro > -- ***** Richard Forth "I used to be indecisive, but now, I''m not so sure!" *****
_______________________________________________ Peterboro mailing list [email protected] https://mailman.lug.org.uk/mailman/listinfo/peterboro
