New answers tagged

1

Try this $ date -d @1469411110 Sun Jul 24 21:45:10 EDT 2016 $ date -d @1469411110 '+%F +T' 2016-07-24 21:34:36 EST 2016 $ date -d "$(date -d @1469411110)+10 days" Wed Aug 3 21:45:10 EDT 2016 $ date -d "$(date -d @1469411110)+10 days" +'%F %T' 2016-08-03 21-45-10


0

I didn't really like the obscurity of the shell commands and quickly did it in python. It recursively sets all directory mtimes to the newest non-excluded file/dir mtime inside. import os import sys EXCLUDE_FILES = ['.DS_Store'] EXCLUDE_DIRS = ['.git', '.hg'] def inheritMTime(path): for root, dirs, files in os.walk(path, topdown=False, ...


1

In the context of -cnewer of find, "status" means "inode". So it referring to the time when the inode of the file was last changed. Also read about inodes to get a grasp of what are these and what they contain.


3

Your filesystem is mounted with relatime by default. Access times will not be updated, if they're already newer than or equal to the modified time of the file. This is an (POSIX-violating) optimization, to avoid every single file read causing a write to the disk. Apparent atime updates are not affected by buffering. (lazyatime will buffer atime for up to ...


8

With ls, though you may not always be able to get the time, you should be able to derive the date (year, month and day of the month). In the C locale, the date output in ls -l should either be Mmm dd HH:MM for recent files (and you should be able to derive the year (either this year or the previous one) or Mmm dd YYYY for older files or files with a ...


1

If you have GNU ls: ls --time-style=long-iso -l or ls --time-style=+FMT -l where FMT follows date command format. In your case: ls --time-style=+%Y/%m/%d -l


-2

if you want exactly 48 hours old files not 2 days, then u should add --daystart in your find command. this will help you. find . type -f -daystart -mtime +1


3

As it turns out, I just needed to read the documentation a little closer: tztime berlin { format = "%Y-%m-%d %H:%M:%S %Z" timezone = "Europe/Berlin" } All I needed to do was change mine to: tztime utc { format = "%I:%M:%S" timezone = "Etc/UTC" } then restart i3, and voila! Now it's so much easier to use UTC.


1

You may use the stat command: $stat -c --%x file or symlink It doesn’t change it , it just report the last access time man stat NAME stat - display file or file system status SYNOPSIS stat [OPTION]... FILE... ............................. ............................. %w time of file birth, human-readable; - if unknown ...



Top 50 recent answers are included