find ~ -type f -name “.*” FIND the hidden files in your home directory (~) find . -name *~ -type f -delete Delete all files ending in ~ find . -name *.svn -type d -print0 | xargs -0 /bin/rm -rf Delete all .svn files under current dir find . -name *.c -perm /u+x -type f […]
xargs
Make emacs grep/grep-find ignore .svn directories
Emacs grep and grep-find command used to work great for me until I started working with SVN and all those .svn directories started popping up in my emacs grep searches… So how can we make the emacs grep-find command ignore all the .svn directories? Being mostly a “git” guy, and having been recently introduced to […]
How to uninstall the old kernels in Ubuntu (and grub)
How can we remove the unused linux kernels and at the same time have our boot configuration (grub’s entries in the grub cfg menu) updated? First we want to list all the kernel-related packages, like linux-image and linux-headers, linux-generic, etc: $ dpkg -l linux-* On my 10.04 Ubuntu system the above command results in the […]
HowTo: Listing (changed/untracked) files in git
When working with git it may often be convenient to get a (pure) list of files to give to some other command (e.g. astyle). This may be implemented as a trigger on the server but that has its pros and cons. Listing the modified files and processing them locally is the safest way as this […]