I could just remember to search wikipedia for "Date (Unix)" or search my site for "Unix". This was easier.

Source: Wikipedia: Date (Unix)

Format specifiers (format string starts with +)
Specifier Description Values/Example
%a weekday, abbreviated Mon
%A weekday, full Monday
%d day of the month (dd), zero padded 04
%e day of the month (dd) 4
%j day of year, zero padded 001-366
%u day of week starting with Monday (1), i.e. mtwtfss 1
%w day of week starting with Sunday (0), i.e. smtwtfs 1
%U week number Sunday as first day of week 01–53
%W week number Monday as first day of week 01–53
%V week of the year 01–53
%m mm month 07
%h Mon Jul
%b Mon, locale's abbreviated Jul
%B locale's full month, variable length July
%y yy two digit year 00–99
%Y ccyy year 2011
%g 2-digit year corresponding to the %V week number
%G 4-digit year corresponding to the %V week number
%C cc century 00–99
%D mm/dd/yy 07/4/11
%x locale's date representation (mm/dd/yy) 07/4/2011
%F %Y-%m-%d 2011-07-4
%l (Lowercase L) hour (12 hour clock) 1
%I (Uppercase I) hour (12 hour clock) zero padded 01
%k hour (24 hour clock) 13
%H hour (24 hour clock) zero padded 13
%p locale's upper case AM or PM (blank in many locales) PM
%P locale's lower case am or pm pm
%M MM minutes 20
%s seconds since 00:00:00 1970-01-01 UTC (Unix epoch) 1309785651
%S SS second 00–60
(The 60 is necessary to accommodate a leap second)
%N nanoseconds 000000000–999999999
%r hours, minutes, seconds (12-hour clock) 01:20:51 PM
%R hours, minutes (24 hour clock) hh:mm e.g. 13:20
%T hours, minutes, seconds (24-hour clock) 13:20:51
%X locale's time representation (%H:%M:%S)
Date and Time
%c locale's date and time Sat Nov 04 12:02:33 EST 1989
Time zone
%z -zzzz RFC-822 style numeric timezone -0500
%Z time zone (e.g., EDT) nothing if no time zone is determinable EST

Amazing little script I found on Stack Overflow. Wasn't really my solution as after 2 hours, realised that the customer had been looking at the wrong server. But this script showed me where the cron job we intended was located.


# System-wide crontab file and cron job directory. Change these for your system.

# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")

# Given a stream of crontab lines, exclude non-cron job lines, replace
# whitespace characters with a single space, and remove any spaces from the
# beginning of each line.
function clean_cron_lines() {
    while read line ; do
        echo "${line}" |
            egrep --invert-match '^($|\s*#|\s*[[:alnum:]_]+=)' |
            sed --regexp-extended "s/\s+/ /g" |
            sed --regexp-extended "s/^ //"

# Given a stream of cleaned crontab lines, echo any that don't include the
# run-parts command, and for those that do, show each job file in the run-parts
# directory as if it were scheduled explicitly.
function lookup_run_parts() {
    while read line ; do
        match=$(echo "${line}" | egrep -o 'run-parts (-{1,2}\S+ )*\S+')

        if [[ -z "${match}" ]] ; then
            echo "${line}"
            cron_fields=$(echo "${line}" | cut -f1-6 -d' ')
            cron_job_dir=$(echo  "${match}" | awk '{print $NF}')

            if [[ -d "${cron_job_dir}" ]] ; then
                for cron_job_file in "${cron_job_dir}"/* ; do  # */ 
                    [[ -f "${cron_job_file}" ]] && echo "${cron_fields} ${cron_job_file}"

# Temporary file for crontab lines.
temp=$(mktemp) || exit 1

# Add all of the jobs from the system-wide crontab file.
cat "${CRONTAB}" | clean_cron_lines | lookup_run_parts >"${temp}" 

# Add all of the jobs from the system-wide cron directory.
cat "${CRONDIR}"/* | clean_cron_lines >>"${temp}"  # */ 

# Add each user's crontab (if it exists). Insert the user's name between the
# five time fields and the command.
while read user ; do
    crontab -l -u "${user}" 2>/dev/null |
        clean_cron_lines |
        sed --regexp-extended "s/^((\S+ +){5})(.+)$/\1${user} \3/" >>"${temp}"
done < <(cut --fields=1 --delimiter=: /etc/passwd)

# Output the collected crontab lines. Replace the single spaces between the
# fields with tab characters, sort the lines by hour and minute, insert the
# header line, and format the results as a table.
cat "${temp}" |
    sed --regexp-extended "s/^(\S+) +(\S+) +(\S+) +(\S+) +(\S+) +(\S+) +(.*)$/\1\t\2\t\3\t\4\t\5\t\6\t\7/" |
    sort --numeric-sort --field-separator="${tab}" --key=2,1 |
    sed "1i\mi\th\td\tm\tw\tuser\tcommand" |
    column -s"${tab}" -t

rm --force "${temp}"

1. If someone wants to use Ubuntu as a home media pc connected to a
tv, there is the problem of overscan; consumer tv's crop off the
border around the image. How does Ubuntu intend to officially solve
this? Right now LinuxMCE has it's own method for doing this so the
LMCE UI is never cropped off, but when the user switches back to
Ubuntu's gnome desktop, the top nav bar is cut off if he's using a
normal tv and not a pc monitor. I'd like to have 1 screen adjustment
tool that correctly adjusts both the lmce desktop and the main ubuntu
desktop, so even when using the Ubuntu desktop on a TV, the top nav
isn't cropped.  Any ideas?

 I've added this article because I didn't know before and now I do...  Hopefully I won't forget but may do so I'll be able to look here and this should help.