Tag Info

New answers tagged


The kernel knows which pages are modified the same way it does any other page: when its written to, a flag in the page tables is set to mark it "dirty". That's done either by the CPU or MMU, or with their help (e.g., they may set the bit directly, or raise an interrupt to have software do it). But actually, the behavior you're assuming isn't guaranteed. ...


If you want milliseconds instead of nanoseconds precision, you might use %3N instead of %N: $ date +'%d/%m/%Y %H:%M:%S:%3N' 12/04/2014 18:36:20:659 or with your desired use of $(…): $ echo "$(date +'%d/%m/%Y %H:%M:%S:%3N')" 12/04/2014 18:36:20:659 But be aware, that %N may not implemented depending on your target system or bash version. Tested on an ...


A bit more perlish: echo 1397028688|perl -l12ne 'print scalar localtime $_' Wed Apr 9 09:31:28 2014


I would use: $ date +%s%3N which returns milliseconds since Unix epoch.


With zsh: autoload age rm -f -- *.txt(D.e{age 2014/03/20 2014/03/30}) With GNU or FreeBSD find: find . -maxdepth 1 -name '*.txt' -type f -newermt 20140320 \ ! -newermt 20140330 -delete That's for files modified between 2014-03-20 00:00:00 and 2014-03-30 00:00:00.


touch -m -r file.txt -d '-1 hour' file.txt

Top 50 recent answers are included