From 794d4ba7b35f0dd0787ab899688857d54d29b801 Mon Sep 17 00:00:00 2001 From: PoplarYang Date: Mon, 16 May 2022 00:13:47 +0800 Subject: [PATCH 1/3] fix typo "//dev/shm" --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ab8425..9574b34 100644 --- a/README.md +++ b/README.md @@ -3240,9 +3240,9 @@ fallocate -l 10G 10Gigfile ##### Create dummy file of certain size (e.g. 200mb) ```bash -dd if=/dev/zero of=//dev/shm/200m bs=1024k count=200 +dd if=/dev/zero of=/dev/shm/200m bs=1024k count=200 # or -dd if=/dev/zero of=//dev/shm/200m bs=1M count=200 +dd if=/dev/zero of=/dev/shm/200m bs=1M count=200 # Standard output: # 200+0 records in From 3cf8bdfe461789172a09a7bdb68a8c539e0ad76f Mon Sep 17 00:00:00 2001 From: PoplarYang Date: Mon, 16 May 2022 00:33:16 +0800 Subject: [PATCH 2/3] add 'current time point for N days ago or after' --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 9574b34..bc14aa9 100644 --- a/README.md +++ b/README.md @@ -1145,6 +1145,21 @@ date --date @1615852800 ``` +##### Print current time point for N days ago or after N days +```bash +# get this time a day ago +date -d"1 day ago" +"%F %H:%M:%S" + +# get this time tomorrow +date -d"-1 day ago" +"%F %H:%M:%S" + +# get this time 7 days ago +date -d"1 week ago" +"%F %H:%M:%S" + +# get this time a week ago +date -d"7 day ago" +"%F %H:%M:%S" +``` + ##### wait for random duration (e.g. sleep 1-5 second, like adding a jitter) ```bash sleep $[ ( $RANDOM % 5 ) + 1 ] From 232900349a659583902ac26f4007a6b6535642fb Mon Sep 17 00:00:00 2001 From: PoplarYang Date: Tue, 17 May 2022 18:07:22 +0800 Subject: [PATCH 3/3] fix typo Co-authored-by: kang <1115610574@qq.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc14aa9..2246c55 100644 --- a/README.md +++ b/README.md @@ -1154,10 +1154,10 @@ date -d"1 day ago" +"%F %H:%M:%S" date -d"-1 day ago" +"%F %H:%M:%S" # get this time 7 days ago -date -d"1 week ago" +"%F %H:%M:%S" +date -d"7 days ago" +"%F %H:%M:%S" # get this time a week ago -date -d"7 day ago" +"%F %H:%M:%S" +date -d"1 week ago" +"%F %H:%M:%S" ``` ##### wait for random duration (e.g. sleep 1-5 second, like adding a jitter)