SHTOOL-MDATE.TMP(1)

πŸ“¦
version 2.0.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ NAME ✨

ok so bestie, this is shtool-mdate β€” the GNU shtool command that pretty-prints the last modification time of a file. literally the glow-up your timestamps deserve πŸ’…


🌸 SYNOPSIS 🌸

shtool mdate [-n|--newline] [-z|--zero] [-s|--shorten] [-d|--digits]
[-f|--field-sep str] [-o|--order spec] path

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: you hand it a file or a directory path, and it prints out that path's last modification time all pretty and formatted. And the best part? You get to choose the format of the date it shows you. main character energy, honestly πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

These are the flags, bestie. Collect them all πŸ’–

  • -n, --newline β€” By default the output goes to stdout and then gets a "newline" tacked on the end (that's ASCII character 0x0a, iykyk). Use -n and that newline? Gone. Not invited. ✨
  • -z, --zero β€” Pads the numeric day and numeric month with a leading zero. Default is variable width (so like, no padding, it does its own thing).
  • -s, --shorten β€” Shortens the month name to an English three-character abbreviation. Default is the full English name. And heads up: this option is silently ignored when you combine it with -d. She just doesn't show up to that party πŸ™ˆ
  • -d, --digits β€” Uses digits for the month. Default is to use an English name.
  • -f, --field-sep str β€” The field separator string that sits between the day / month / year triple. Default is a single space character.
  • -o, --order spec β€” Specifies the order of the day / month / year elements inside that triple. Each element is represented as a single character, one out of "d", "m" and "y". The default for spec is "dmy".

🌈 EXAMPLE 🌈

#   shell script
shtool mdate -n /
shtool mdate -f '/' -z -d -o ymd foo.txt
shtool mdate -f '-' -s foo.txt

like… ate that, no crumbs πŸ“


πŸ‘‘ HISTORY πŸ‘‘

The GNU shtool mdate command was originally written by Ulrich Drepper in 1995, and then revised by Ralf S. Engelschall <rse@engelschall.com> in 1998 so it could be included into GNU shtool. iconic lineage fr fr 🫢


πŸ”₯ SEE ALSO πŸ”₯

shtool(1), date(1), ls(1).


ok that's the whole thing, you're so welcome πŸ’œ this was shtool 2.0.8, dated 18-Jul-2008 β€” go forth and format your timestamps, bestie, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from