How to test recursively various archive files

The following simple command will browse through the tree of the current directory for various archive files and test their integrity. If the test fails, it'll print the file's path. You can easily extend it by adding more filename patterns and tests.
find . -type f \( \( -iname '*.zip' -o -iname '*.jar' -o -iname '*.war' -o -iname '*.ear' -o -iname '*.odt' -o -iname '*.ods' -o -iname '*.odp' -o -iname '*.docx' -o -iname '*.xlsx' -o -iname '*.pptx' -o -iname '*.xpi' \) -not -exec sh -c "unzip -t -P '' '{}' > /dev/null 2>&1" \; -o \( -iname '*.tar.gz' -o -iname '*.tgz' \) -not -exec sh -c "tar tzf '{}' > /dev/null 2>&1" \; -o -iname '*.tar.bz2' -not -exec sh -c "tar tjf '{}' > /dev/null 2>&1" \; -o -iname '*.tar' -not -exec sh -c "tar tf '{}' > /dev/null 2>&1" \; -o -iname '*.rar' -not -exec sh -c "unrar t -p- '{}' > /dev/null 2>&1" \; \) -print

PHP + LDAP + SSL (LDAPS) authentication in Windows running Apache

I tried to set up LDAPS (LDAP + SSL) based authentication in a Drupal site, but it didn't want to work. Here's how I managed to solve the issue.

Managing SSL certificates for various JVMs on Debian Squeeze

In case of the Sun/Oracle JVM (JRE/JDK) the SSL certificates are store in this keystore: /etc/java-6-sun/security/cacerts. To update it, use the keytool utility that comes with the JRE/JDK.

How to configure SSL (aka. ldaps) for libnss-ldap/auth-client-config in Ubuntu

The LDAPClientAuthentication page in the Ubuntu Community wiki describes the basic setup pretty well. However if you bring encryption (SSL/TLS) into the game, it's a quite different story.

How to configure phpLDAPadmin to connect to an LDAP server via SSL (ie. ldaps)

The devil is in the details ... Smile
If you connect through SSL, you've to use the following parameters in config.php:
$servers->setValue('server','host','ldaps://ldapserver.example.com:636');
$servers->setValue('server','port',0);
Notice that the host parameter contains the port too and the port parameter contains 0 (zero).

How to access (read/write) an Ext2/Ext3/Ext4 partition in Windows

The respective Wikipedia article lists most of these already:
  • Ext2 Installable File System For Windows: for Windows NT4.0/2000/XP/2003/Vista/2008, read+write access to Ext2/3/4 (the latter two only without journal!), drive mapping supported
  • DiskInternal's Linux Reader: for Windows 95, 98, ME, NT, 2000, XP, 2003 Server, Vista, read-only, no drive mapping (a filebrowser UI is available)
  • Ext2Fsd: for Windows 2k, XP, Vista and Win7, read+write for Ext2/3/4, journals supported, drive mapping supported
  • Explore2fs: for various Windows versions, read-only access to Ext2/3 (probably Ext4 wo journal), no drive mapping (filebrowser UI)
  • Paragon ExtBrowser: for Windows XP and Vista, read+write to Ext2/3 (probably 4 wo journal), no drive mapping (access through a special folder in Windows Explorer via Windows Name Space Shell Extension)
  • Ext2Read: for various Windows versions, read-only access to Ext2/3 (probably Ext4 wo journal), no drive mapping (filebrowser UI)

How to Mount Dirty EXT4 File Systems

The post describes techniques useful if you try to mount a filesystem that has serious errors. In the blog (and referenced older posts) Ext3 and Ext4 are both covered.

How to copy a directory tree from one place to another preserving permissions (and skipping erroneous directory entries)

I already documented how to use tar and ssh to copy a directory tree to another host. This time lets copy a filtered subset of a directory to another (local) directory.

Monit - monitor processes/services/files/directories/etc. and react if necessary (for Linux/Unix)

"Monit is a free open source utility for managing and monitoring, processes, programs, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations."

Munin plugin to monitor DNS response times

With this Munin plugin you can monitor the DNS response times of specific queries. It uses dig to execute the DNS queries. You can specify multiple hostnames to query for and a separate DNS server for each query. Quite useful. I've added the hostnames (that you query for) to the labels in the generated Munin reports in the attached (modified) version of the plugin.

Syndicate content