SSH Connection Manager in Linux – Perl Auto Connector

Hello everyone,

Recently I found an awesome piece of software that can save you tons of time if you connect to several hosts through SSH from Linux.

In Windows, there are several choices like Putty CM (dead) or SuperPutty, which let you store connection data and connect to a host simply by double-clicking on the connection name later.

In Linux, the Perl Auto Connector (PAC) does this and does it very well.

It’s developed for Debian based distros, but you can find it the RPM package as well in their project page: https://sourceforge.net/projects/pacmanager/

Just go over to the “Files” tab and suit yourself.

You may run into a couple issues after installing, since it relies in some included libraries that must be removed  prior to being able to use it

After you install the RPM package, run the following

sudo find /opt/pac/ -name "Vte.so*" -exec rm {} +
sudo yum -y install perl-Gnome2-Vte

That will force the program to rely on global libraries instead of embedded libraries.

Enjoy!

 

Advertisements

How to ‘find’ with argument list too long

Hello dear readers,

Today I’m going to share a very short, but (I hope) useful piece of information for some Linux admins and DBAs as well.

The find tool is very good in isolating files that match a certain pattern.

I use it, in particular, for cleaning up old logs and files that are no longer required in file system if you generate 5 to 10 logs a day. You could even do this manually, but when you generate 5 to 10 logs per minute, you need to automate this as much as you can.

So piping the following commands together do the job nicely

find . -name *xmin*.log -mtime +30 | xargs -r rm -f

Or so I thought.

Lately I have been receiving the following error:

/usr/bin/find: Argument list too long

A shame… Cleanup is not working anymore and I have to go over it manually. But manually doesn’t work either as the number of files is huge.

Turns out that the error pops up at substitution time because of the pattern *xmin*.log. It doesn’t act as a pattern at all but as a list of all the files that match that pattern.

So, if you want it to work as expected, just enclose it in single quotes as follows:

find . -name '*xmin*.log' -mtime +30 | xargs -r rm -f

And that’s it… You’re back in the automated game!