Posts about info

2014-02-28 Batch removing files on a FTP server

In a previous post, I have shown how to convert MoinMoin pages to this blog (Nikola angine). Let's now tidy up the place and remove obsolete pages.

Pages that were succesfully converted:

Read more…


2013-03-25 using tabs in vim

  • call vim to open more files

    vim -p file1 file2 file3
  • or open one in your editing session

    :tabf <pattern>

    (will find the file corresponding to <pattern>)

  • to switch tab, use gt


2012-09-04 connecting a linux client to a QNAP's LDAP server


2012-03-16 Creating a bootable Debian USB flash drive on MacOsX

  • largely adapted from

  • download the iso

    wget # or
    hdiutil convert -format UDRW -o target.img debian-6.0.4-i386-CD-1.iso
    mv target.img.dmg target.img
  • identify where is your USB stick

    diskutil list
  • unmount the USB stick

    diskutil unmountDisk /dev/disk2
  • write on the stick

    mv target.img.dmg target.img
    sudo dd if=target.img of=/dev/rdisk2 bs=1m
  • eject the USB stick

    diskutil eject /dev/disk2


2011-07-10 mounting filesystems using SSH

2011-07-12 11:51:19

install on ubuntu

  1. $ sudo apt-get install sshfs
    [sudo] password for toto:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 43.7 kB of archives.
    After this operation, 160 kB of additional disk space will be used.
    Get:1 natty/main sshfs amd64 2.2-1build1 [43.7 kB]
    Fetched 43.7 kB in 0s (1,477 kB/s)
    Selecting previously deselected package sshfs.
    (Reading database ... 342224 files and directories currently installed.)
    Unpacking sshfs (from .../sshfs_2.2-1build1_amd64.deb) ...
    Processing triggers for man-db ...
    Setting up sshfs (2.2-1build1) ...
  2. $ sudo gpasswd -a $USER fuse
    Adding user toto to group fuse

using sshfs (mac and ubuntu)

  1. Create a mountpoint and give yourself ownership

    sudo mkdir /media/mount-name
    sudo chown your-username /media/mount-name
  2. Mount the filesystem

    sshfs remote-system-name:/remote-folder /media/mount-name
  3. Unmount the filesystem

    fusermount -u /media/mount-name

automating the process sshfs (mac and ubuntu)

  1. script to :

    mkdir ~/spawn
    sshfs toto@server:~/spawn ~/spawn
  2. script to unmount :

    fusermount -u  ~/spawn
    rmdir ~/spawn


2010-12-27 how to find stuff

  • the most simple command is locate :

    locate Python.h

    ; it is based on a database updated regulalry (most often daily).

  • the most powerful is find :

    # To find all files modified in ~/Sites three days ago:
    find ~/Sites -mtime 3
    # and 10 minutes ago:
    find ~/Sites -mmin 10
    #A time specified by -n means less than, while +n means more than.
    #To find all files in you home directory modified within the last week use:
    find ~ -mtime -7
    find ~ -newer last-backup.log
    # will find all files changed (or created) since last-backup.log was files larger than 2 megabytes (4000 of these 512 byte blocks):
    find ~ -size +4000
    find empty files% find . -empty


2008-12-05 duplicate files

2011-07-06 14:00:04

You may find yourself overwhelmed by files and in the need to keep the filesystem organized. If deleting is the best option, you may consider these 2 options:


Dupinator, tries to find duplicates and to report them in order to clean-up the organization of your files.


It works by:

  • launched via command line by passing a set of directories to be scanned
  • traverses all directories and groups all files by size
  • scans all sets of files of one size and checksums (md5) the first 1024 bytes
  • for all files that have the same checksum for the first 1024 bytes, checksums the whole file and collects together all real duplicates
  • deletes all duplicates of any one file, leaving the first encountered file as the one remaining copy