Tag Archives: cli
Batch rename files on OSX/Unix
I had to rename a bunch of files in a directory by just changing a prefix. Perfect for the command line, no? After a bit of googling (that exists as a verb now, doesn’t it? ) I found this article:Batch … Continue reading
find & sed: find and replace on the command line
Since using vim, I sometimes miss the great find and replace that TextMate offers, but fear not: find and sed fill the gap quite nicely: find . -type f -exec sed -i ‘s/search/replace/g’ ‘{}’ \; To make sure your find … Continue reading
Creating patch files with git
Git has a built in way to create patches and Github has a great write up on this. The git format-patch command is useful if all your changes are committed and you want to create a patch of certain commits. … Continue reading
Updating the locate database on OSX
locate is a very handy command to find files on the system. It is much faster than find since it keeps a database of all the system files. This database is periodically updated, but if you want to update it … Continue reading