SHTOOL-MDATE.TMP(1)
β¨ 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 tostdoutand then gets a "newline" tacked on the end (that's ASCII character0x0a, iykyk). Use-nand 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 π₯
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
- debian bookworm: shtool 2.0.8-10 Β· GPL-2.0-or-later
- debian trixie: shtool 2.0.8-10 Β· GPL-2.0-or-later
- ubuntu jammy: shtool 2.0.8-10 Β· GPL-2.0-or-later
- ubuntu noble: shtool 2.0.8-10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms