Category: Unix
Script listing all the keys on a memcache server
This script lists all the keys on a memcache server. #!/bin/bash nc localhost 11211 > /tmp/$$.1 <<EOF stats items EOF cut -d: -f2 /tmp/$$.1 | grep -v END | uniq
Read MoreRecording a terminal session under Linux
It is possible to record a terminal session under Linux with ttyrec. It also records vi, emacs, etc. sessions. Fisrt, install ttyrec sudo apt-get install ttyrec To start recording a
Read MoreHow To Setup A Protected Wireless Connection Via the Command-Line
Setting up a wireless connection via the command line may vary depending on the USB Wireless Interface you are using. These instructions also work for the Raspberry PI running Wheezy.
Read MoreMasquerading or replacing outgoing SMTP email address with Postfix
Postfix can replace an outgoing email address by another one. To do so, you must perform these steps: Add in /etc/postfix/main.cf the following line smtp_generic_maps = hash:/etc/postfix/generic_maps Add in hash:/etc/postfix/generic_maps a
Read MoreCreate an ext3 or an ext4 partition without a journal
Most of the time, having a journal for ext3 and ext4 partitions is pretty useful. Nevertheless, you can prevent creating a journal by adding the option ^has_journal. For example: mkfs
Read MoreInitializing a brand new disk with “parted”
“parted” is a replacement for “fdisk” of Linux. It can handle disks larger than 2 TB. Issue this command to launch “parted” where /dev/sdL is the disk you want to
Read MoreHow to unmount an encrypted partition?
Unmount the partition umount /mnt Unmap the partition cryptsetup luksClose securebackup
Read MoreHow to mount an encrypted partition?
Map the partition cryptsetup luksOpen /dev/sdXN securebackup Mount the partition mount /dev/mapper/securebackup /mnt
Read MoreHow to setup partition encryption?
To setup partition encryption on Ubuntu, perform the following steps: Install the required software apt-get install cryptsetup For more security, erase the partition you want to encrypt with one of
Read MoreHow to use the loop device on Unix?
The loop device on Unix lets access a file as a block device. Disks are block devices. So, it is possible to use a file as a disk. The first
Read MoreSSH login without password
It is possible to securely connect to a SSH server without a password. To do so, you must perform the following steps. It assumes that both machine are running a
Read MoreHow to create a SSH tunnel
You can connect to a remote host [remote-host] using another machine [proxy-host]. This can be accomplished if the [proxy-host] as an SSH server running. To do so, logon to the
Read MoreUnix History
I can bet that you have no idea what the Unix timeline looks like. Curious? Download this PDF file from www.levenez.com.
Read More