Say you would like to add the .png extension to all files. rename ‘s/$/.png/’ * Source: http://askubuntu.com/questions/74011/how-to-add-an-extension-to-all-files-via-terminal Now recursively add file extension to all files! For example, you have a few directories and sub-directories containing files with no file extension. And you want to add .jpg to all the files contained within these directories. This […]
How to get a directory listing of all the files beginning with “certain” character(s)
To list all the files with the .png extension in the dir ls | grep ‘\.prj$’ | wc -l Parsing the output of ls is unreliable because ls mangles unprintable characters. Here is a fully reliable way of counting the files matching a certain extension. This shell snippet creates an array containing the file names, […]
Why I’m banned on your Facebook Page?
I got a call at 11:20 pm while I was already worn out after long day of work and commute and worse, finding my 2 years old nephew suffering severe diarrhea since morning. The guy seemed very agitated about something relating our Facebook fan page. “His comment has been deleted and he has been banned […]
Happy 4th of July
Hello America! Happy birthday to you. You have many things I may not like, specially the aggression worldwide but I love your spirit of Freedom, Equality, Courage and Faith! I hope your resolution will be non-discriminatory toward universal humanity, not just USA one. You know well, great power comes with great responsibility and you are […]