Posts Tagged ‘Linux’

Instant or Passwordless SSH-ing in Linux

March 3rd, 2008

Well, to be “correct” the title of this should have been “how to add your key to the list of authorized public keys on a remote or local linux machine”, but being a newbie like myself, I would not have known to search for it. If I wanted to find out about logging in automatically to a remote machine using a generated public key, I myself would have used “Passwordless SSH” – so there you go.

To get started, I’ll assume that you have OpenSSH set up (it’s setup by default… well usually) and that your remote machine has OpenSSH-server set up.

If not, then do the following on the remote machine:

$ sudo aptitude install openssh-server

» Read more: Instant or Passwordless SSH-ing in Linux

Adding Multiple files to SVN repository

February 18th, 2008

I was surprised that there was no built in way of adding multiple files to a SVN repository. I did a quick search and it seems that there is “one easy way” – execute the following piped command line from a Terminal window.

you@yourmachine$ svn st | grep "^?" | awk '{ print $2}' | while read f; do svn add $f; done

I could have sworn that I came across an easier way of doing this without resorting to doing the above.
» Read more: Adding Multiple files to SVN repository

YeahConsole a lighter yakuake alternative for xubuntu linux

January 17th, 2008

This week, I’d like to talk about YeahConsole, an alternative to yakuake, or a more “native yakuake” for xubuntu and ubuntu. You could also look at it as a lighter terminal emulator wrapper for those who do not really like installing extra kde packages just to use yakuake.

» Read more: YeahConsole a lighter yakuake alternative for xubuntu linux

Execute Linux commands in PHP by using backticks

January 13th, 2008

You can execute linux commands within a php script – all you have to do is put the command line in backticks (`).

Recently, I had to upload an archive to a server which did not allow ssh. For files that I need to transfer, I just package them up in a neat archive and transfer the archive file via scp. Not having ssh access however, I uploaded the archive file via ftp and created a script which extracts the file the file looks like the following:
» Read more: Execute Linux commands in PHP by using backticks

Quick Linux Shell Script Example

November 22nd, 2007

When I first moved to linux I had become addicted to keeping my distro updated and so I found myself typing and retyping

$ sudo aptitude update
password:
$ sudo aptitude dist-upgrade

At least once a day. Having read about shell scripts, I thought I’d try my hand at putting this into a shell script which, if you don’t already know, is linux’ more powerful answer to the Windows batch file.

So that’s what I did, and here’s how I did it.

» Read more: Quick Linux Shell Script Example