web analytics
Skip to primary content
Skip to secondary content

MemoSoup

Mix of the things I always forget

MemoSoup

Main menu

  • Home
  • About
  • Links

Monthly Archives: June 2010

Linux: get the version of the system

Posted on 18/06/2010 by bigspoon
Reply

Get the version of the distro:

[cc lang=”bash”]
cat /etc/issue

cat /etc/*-release
[/cc]

Get the kernel version:
[cc lang=”bash”]
uname -r
[/cc]

Posted in Linux | Tagged distro, kernel, Linux, version | Leave a reply

Perl: get file checksum

Posted on 08/06/2010 by bigspoon
Reply


use Digest::MD5;
use IO::File;

my $chk = Digest::MD5->new();

foreach my $file (@ARGV)
{
$chk->addfile(IO::File->new($file));

print "$file -> ",$chk->hexdigest,"\n";
}

The additional details could be found on IBM site

Posted in Perl | Tagged checksum, file, md5, Perl | Leave a reply

Archives

  • March 2021
  • February 2016
  • February 2013
  • December 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • July 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009

Meta

  • Log in
Proudly powered by WordPress