-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
62 lines (51 loc) · 1.99 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# NAME
aged - Find files sorted by timestamp metadata.
# SYNOPSIS
This script is composed of two functions 'aged' and 'ti'.
aged [OPTIONS] [TARGET ...]
List files and directories sorted by file system timestamp metadata.
OPTIONS:
-a -c -m : Sort by time last of access, change, or modification.
-d : Limit results to directories.
-f : Limit results to files.
-l : Include columns for date and time.
-n NUMBER : List only the first NUMBER lines.
-r : Reverse sort order, newest files first.
-p GLOB : Print only files matching GLOB.
-y INTERVAL : Show files younger than INTERVAL.
-z INTERVAL : Show files older than than INTERVAL.
EXAMPLES:
$ aged -n1; aged -r -n1
Show the least and most recently accessed file here.
$ aged -m -l -r -n10 ~/foo
Show the path and timestamp of the ten most recently modified files "~/foo".
$ aged -m -z 2d -y 3w
Show files modified more than two days but less than three weeks ago.
$ feh -Z -f <(aged -a -n6 -p '*.jpg' ~/img/)
View the six least recently accessed JPEGs in the given directory.
$ mpv $(aged -m -p '*.ogg' -n1 ~/videos/)
Play the oldest OGG video in the given directory.
$ aged -m -y 30d ./quux.conf || echo "not recently"
Check if a file has been modified within 30 days.
ti [OPTIONS] INTERVAL
Parse and render temporal shorthand.
UNITS: | SCALES:
s : second d : day | D : 10e1 M : 10e6
m : minute w : week | H : 10e2 G : 10e9
h : hour y : year | K : 10e3 T : 10e12
MODES
-n : numeric : output integer number of seconds in INTERVAL
-s : shorthand : output string shorthand of INTERVAL
-a : after : output date plus INTERVAL
-b : before : output date minus INTERVAL
OPTIONS
-d TIME : calculate dates relative to TIME
-f FORMAT : render dates with printf using FORMAT
SAMPLE
1d : 86400 | 1Ms : 1000000
43m20s : 2600 | 3Kh : 259200000
18h12m16s : 65536 | 2Gy : 63115200000000000
# AUTHOR
Mike Lalumiere 2018
# License
GPLv3 (see LICENSE)