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.
Network File Systems (NFS)
Standard Mount Command (Non-locking):
mount -t nfs -o nolock 10.0.0.3:/home/vm_share /mnt/shares
Using -o nolock is often crucial when mounting from a virtual machine or embedded target that doesn’t support the NLM (Network Lock Manager) protocol.
Comments & Feedback