rand(Ø)

> beautiful code & photos

about <

Posts tagged: bash

SH: md5sum -c like for Mac OSX

Okay, since I plan to upload old backup archives to the cloud with fear to lose data integrity, I wanted to calculate the MD5 hash of these archives before any manipulation. OSX has natively the MD5 command provided by OpenSSL but no argument to check automatically a file checksum against another file which would contain its checksum.
And the -r generates broken MD5SUMS pattern output (the default OpenSSL star is stripped)!

In order to be able to use the md5sum command on OSX like on other Unix platforms, I developped a small script that will behave alike. I hosted it

> Continue Reading

ZSH: Open a new window using the last pwd

A friend of mine used ZSH on his Mac and since I know him and his .zshrc, I keep ZSH as main CLI on my laptop, it works so well, I advice you to switch if still not :P .

But, I was very tired of typing a long cd command every time I wanted to open a new Terminal tab to execute a command in the same directory or close to where I was working ; so I looked for a hack to get rid of this pain over the Internet and now, I'd like to share it with you.

The

> Continue Reading