Copy the mtime from one file to another
This one-liner is useful to copy the last-modified attribute for example from a .less
file to the generated .css
, maybe for syncing purposes.
touch --date="$(stat --printf "%y" style.less)" -m style.css
Written by Filippo Valsorda
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Related Tags
#bash
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#