How can I display how long ago a given date was. For example:
echo "File was modified `date -r file.txt`"
This would echo:
File was modified Tue Jan 7 00:52:40 GMT 2014
However I want it to resemble something like the following:
File was modified 3 seconds ago
File was modified 1 hour ago
File was modified 2 days ago
File was modified 3 weeks ago
Or something like that. The point is that it should be easy to understand when included in a sentence.
(This is not a duplicate of this question which only specified whole days.)