Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

What is the output of date -u +%W$(uname)|sha256sum|sed 's/\W//g' (on Arch Linux if it matters)?
How do I find that out?

share|improve this question
The best way to find out what is to run it. The best way to find out why is to read the documentation of the three commands involved. – Gilles Jan 7 '11 at 18:34
Although, if you truly haven't seen the commands before, it might be a better idea to read the documentation first. One does not want to get into the habit of simply running any command they come across. – Steven D Jan 7 '11 at 20:04

2 Answers 2

up vote 3 down vote accepted
date -u %W

Displays the current week of the year.


Displays the kernel name.


Generates a SHA-256 Hash Sum.

sed 's/\W//g'

Cuts out all non-word characters.

The |'s are redirecting the output of the first command to the appending command.

Enter the line in a terminal, f.e. gnome-terminal or xterm:

date -u +%W$(uname)|sha256sum|sed 's/\W//g'

Depending on the date and the operating system installed, this will output different hashes, like this:

share|improve this answer
SHA-265 -> SHA-256? – Peter Mortensen Feb 18 '12 at 17:26

1. The 'uname' part

To answer the first question, the crucial thing is what uname without a parameter returns on Arch Linux. The man page does not define it, but uname Command says it is equivalent to uname -s:

-s   Displays the system name. This flag is on by default.

For -s, the man page say "print the kernel name". On Arch Linux uname returns


whereas on for example Cygwin uname returns something like:


2. The 'date' part

date -u +%W returns the week number. As the last part ("Linux") is a fixed string, the final output depends on which week the command line is run in (the hash is computed on for example "07Linux"). With this knowledge the output can also be computed on Cygwin.

3. An example

The week number for 2012-02-18 is 7 and date -u +%W`uname` returns (has a leading zero, but this is expected for the task at hand)


and the output from sha256sum (a SHA-2 hash) is:


On Cygwin it can be computed as:

echo '07Linux'|sha256sum|sed 's/\W//g'

(This actually worked when I tried to register at ArchWiki...)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.