Posts Tagged ‘sudo !!’

OpenSolaris Package Management

Tuesday, October 28th, 2008

OpenSolaris is both great and horrible. Horrible in the sense that it is nearly impossible to get anything other than a basic LAMP stack to install/compile without 30 minutes of Googling around and 20 minutes of tweaking environment variable, shared libraries, or make files. After endless [weeks] of banging my head against the desk, Jon came about this solution:

$ pkg set-authority -O http://pkg.sunfreeware.com:9000 sunfreeware
$ pkg refresh

This sets the default pkg authority to the SunFreeware site – full of pre-compiled binaries that are to actually INSTALL and WORK on OpenSolaris/Solaris 10. How novel?

Test it out by installing sudo

$ pkg install -v IPSFWsudo

I’m tagging this post with as many keywords as possible in hopes that people come across this post via Google. I want to love OpenSolaris, but it is such a nightmare to use with open source software. You’d think that out of Sun’s 34,909 employees they could construct a team of 20-30 people whose sole job was to make OpenSolaris usable and competitive with Linux for those trying to host websites.

bash-fu: You forgot to sudo

Wednesday, August 6th, 2008

One of the more routine annoyances of a long day in the terminal is banging out some long command that happens to operate on a file your current user doesn’t have access to.

www@webserver:~$ rm -fr /usr/lib/python2.5/site-packages/buildbot/buildbot.png<br/><br/> rm: cannot remove `/usr/lib/python2.5/site-packages/buildbot/buildbot.png': Permission denied

You declined to sudo the command because you you forgot, were feeling cautious, or were unaware of the permissions bits of the file(s) in question. Now you have to type it again, or switch gears and start up some cursor navigation to prepend your sudo.

Next time, as an easy to use alternative, try:

sudo !!

In bash, !! expands to the last run command. sudo !! sudo’s the last command. That was easy.

Subscribe:

Add to Google
RSS
Try ExpanDrive

If you’ve heard of SSH then you need ExpanDrive.