Bypass rm's “argument list too long” error message with xargs

When using rm to delete a large number of files, you may come up against a kernel limitation which limits the length of arguments that can be sent to rm: $ rm * bash: /bin/rm: Argument list too long This one-liner utilizes xargs to bypass this limitation: ls | xargs...

How to reconfigure CPAN

I’m always forgetting the command that’s needed to start CPAN’s configuration wizard back up after its initial setup. To reconfigure CPAN, just execute the follow command from the CPAN prompt: o conf init

Bypassing the “You use an internal update server. Abort.” message when upgrading from SLES 10 to SLES SP1

I’m currently performing an online upgrade from SLES 10 (SUSE Linux Enterprise Server 10) to SLES 10 SP2. While following Novell’s instructions on upgrading from SLES 10 to SLES SP1, I hit the error message below: sles10-32bit:~ # switch-update-serverYou use an internal update server. Abort. The fix was to edit /usr/bin/switch-update-server , comment out the following lines, then run switch-update-server again. # check if there is a old or new update server#if ! echo "$CHECK_URIS" | grep -F "$NEW_SERVER_NAME" >/dev/null 2>&1 &&# ! echo "$CHECK_URIS" | grep -F "$OLD_SERVER_NAME" >/dev/null 2>&1; then# # no old and no new update server => not registered or use an internal mirror# # no need to switch# echo "You use an internal update server. Abort." >&2# echo "You use an internal update server. Abort."# exit...

Configuring the Cisco VPN Client in Ubuntu Linux 7.10 (Gutsy)

I do some work for an organization which requires me to authenticate to a Cisco VPN. Getting the VPN client setup under Mac OS X is a simple matter, but doing the same under Linux required some research. Here’s what worked for me. I’m using the 64-bit x86 version of Ubuntu, which didn’t seem to cause any hiccups: Step 1 – Install the Cisco VPN Client: Check what kernel you’re running by issuing the uname -a command. You should get something like: Linux matt-media 2.6.22-14-generic #1 SMP Tue Dec 18 05:28:27 UTC 2007 x86_64 GNU/Linux Download a copy of Cisco’s VPN client for Linux. If you’re using a 2.6.x kernel, it’s important to use a 4.8.x client. Confirm that you have kernel sources installed for your kernel version. Check the /lib/modules/ directory. Download a patch matching your kernel version from http://tuxx-home.at/. I’m running 2.6.22, so I ran: wget http://tuxx-home.at/projects/cisco-vpnclient/vpnclient-linux-2.6.22.diff Extract Cisco’s VPN client tarball: tar -xzf vpnclient-linux-x86_64-4.8.00.0490-k9.tar.gz Apply the patch: cd vpnclient patch -i ../vpnclient-linux-2.6.22.diff Install the VPN client: sudo ./vpn_install Step 2 – Configure the VPN Client: Take a backup of a working Cisco VPN client’s configuration. The location below is where these files were located on my Mac OS X system. They’re no doubt located somewhere other than the /private folder in other OSes. tar -czf cisco-vpnclient.tgz /private/etc/opt/cisco-vpnclient Copy the cisco-vpnclient.tgz tarball that you just created into the /etc/opt/ directory of your Linux system, and unpack it. sudo tar -xzf cisco-vpnclient.tgz Start the vpnclient service. sudo /etc/init.d/vpnclient_init start Check the name of your VPN’s profile by listing the contents of the Profiles directory. Your profile’s name will...