Linux

How to do a "thorough" fsck (with a progress bar) like the one that is done during boot

Since this is invoked by one of the startup scripts of your OS, the exact behaviour might be a bit different depending on the implementation of your OS (and the specific OS version, eg. Ubuntu had this feature in /etc/init.d/checkfs.sh for quite a long time, then moved it somewhere else). The point is that at some step of your boot process the fsck tool is started with a set of commandline parameters. Eg. Ubuntu Hardy executes something like this:
fsck -C -V -R -A -a -f

Explanation of real, effective, saved set and file system UID/GID values from /proc/<pid>/status

Very informative. It'd have been nice to see at least a reference to the setuid(2) (and/or seteuid(2)) manpage in the description of /proc/[pid]/status in the manpage of proc(5). Sad

How to list setuid executable files

Well, this is really an easy one. I guess people just starting to get to know linux might find it a bit tricky though. The command is this:
find / -type f -perm -4000 -perm +0111 -print
The -perm -4000 option matches files with the setuid bit set. And the -perm +0111 option matches files for which any of the executable bits is set. This command might come handy if you've a rooted Android phone and would like to keep tabs on what executables get setuid root privileges (besides the apps that run something through su).

How to compile strace for use on an Android phone (running an ARM CPU)

The instructions are very precise, following them you get your statically linked strace.

Ice Cream Sandwich explained: MTP - what is it, why use it, and how to set it up

It seems I won't use my Galaxy Nexus on my LTSP thin client through my new USB cradle any time soon. Sad Probably I'll dig up the necessary LTSP modifications to make it work, but not right now. Wi-Fi works just fine. Or almost fine. For some reason if I do long data transfers, the transmit speed gradually fades away ... right until connection is lost. Try to copy a 2GB file from your Nexus to an SSH server (via some SFTP client, eg. AndFTP) and you'll most probably see what I mean.

An easy way to start a HTTP server serving static content/files

I was looking for a oneliner to start a HTTP server and serve static content from a directory. Python's SimpleHTTPServer is the perfect match for the job. Smiling Python is already installed by most linux distributions by default and it's easily available for a lot of other platforms as well. Starting your own little HTTP server was never easier than this:
python -m SimpleHTTPServer 8080
And to access it, open the http://localhost:8080/ URL.

A few basic LDAP searches to discover an OpenLDAP server

If you have to discover an LDAP server, it's important to know the basics. I'll list a few important ldapsearch commands to get you started.

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

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

The devil is in the details ... Smiling
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)
Syndicate content