Really simple batch renaming in Linux
While working on the photos section of trigonakis.com, I wanted to batch rename some photos, so after the renaming their new name would be prefix_i, where i is a incremental value. The following...
View ArticleExtracting citations from a BibTex file using Linux terminal
I had a big (around 40 entries) BibTex file with the references of some papers I studied and I wanted to extract the citations in the format used for citing in Latex (\cite{AuthorYear}). Just today I...
View ArticleRemoving the SVN metadata files (.svn/) in Linux
If you ever want to remove a folder from SVN control (clean the folder by removing the .snv metadata folders) in Linux, you can simply run the following command: rm -rf $(find...
View ArticleSelecting a random file/folder of a folder in Linux
I always had the following problem: “How to select which movie (from the ones in my collection) to watch“. In the past, I had used the random (pseudo-random to be precise) capabilities of C, Java,...
View ArticlePattern Matching Hyphen-Minus Sign in Bash
I was trying to use the sed command to perform some changes to a text and stepped into an interesting “problem”; pattern matching the minus-hyphen (-) symbol. Assume we have the following text:...
View Articlegit: How to revert a file to a specific commit
This entry is part 7 of 7 in the series git: useful HOWTOs git checkout COMMIT_HASH file/to/revert Will bring the file/to/revert file to the state in COMMIT_HASH commit.
View Article