Linux Engineering Utility Cheatsheet

A quick compilation of useful commands and configurations I frequently use in my daily operations. Working with Patches To generate a patch from a single file or directory: diff -Naur [from-file] [to-file] > [YourFileName.patch] -N: Treat absent files as empty. -a: Treat all files as text. -u: Unified output format (best for readability). -r: Recursive directory comparison. Version Control Cleanup Removing all .svn directories recursively: rm -rf `find . -type d -name .svn` Removing Git Metadata: In a Git repository, simply deleting the root .git directory is usually sufficient to remove history and configuration. ...

February 4, 2013 · 1 min · 133 words · Fran Kuo

Ubuntu Transition: Dash vs. Bash

To accelerate boot times, Ubuntu moved to using Dash (/bin/dash) as the default system shell (/bin/sh), replacing the more feature-rich but slower Bash. You can verify this linkage by checking /bin/sh -> /bin/dash. While this is great for system performance, it can cause unexpected failures in shell scripts designed specifically with “Bashisms” (features unique to Bash). If you need to revert the default shell back to Bash for compatibility reasons, you can execute the following command: ...

September 25, 2007 · 1 min · 125 words · Fran Kuo