From fbccea013eef1d303cf9630f49c916d000272a4c Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Wed, 5 Jun 2024 01:45:15 +0700 Subject: [PATCH] feaT: improve f2 --- docs/2023-07-01-pastebin.html | 7 +++++-- posts/2023-07-01-pastebin.md | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/2023-07-01-pastebin.html b/docs/2023-07-01-pastebin.html index d0d7dd2..e5dbf0e 100644 --- a/docs/2023-07-01-pastebin.html +++ b/docs/2023-07-01-pastebin.html @@ -452,10 +452,13 @@ rsync -avzP src/ dst

Rename:

# If dry run, remove --exec
-f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}{ext}" --fix-conflicts --fix-conflicts-pattern "_%02d" --exec
+f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{hash.md5}{ext}" --exec
 
 # Include ImageSize (require exiftool)
-f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}{ext}" --fix-conflicts --fix-conflicts-pattern "_%02d" --exec
+f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}_{hash.md5}{ext}" --exec
+
+# Not include time
+f2 --sort=mtime --replace "{xt.ImageSize}_{hash.md5}{ext}" --exec
 
 # Remove space in directory
 f2 --find " " --replace "_" --string-mode --only-dir --exec
diff --git a/posts/2023-07-01-pastebin.md b/posts/2023-07-01-pastebin.md index c057515..ed79cd5 100644 --- a/posts/2023-07-01-pastebin.md +++ b/posts/2023-07-01-pastebin.md @@ -323,10 +323,13 @@ Rename: ```sh # If dry run, remove --exec -f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}{ext}" --fix-conflicts --fix-conflicts-pattern "_%02d" --exec +f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{hash.md5}{ext}" --exec # Include ImageSize (require exiftool) -f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}{ext}" --fix-conflicts --fix-conflicts-pattern "_%02d" --exec +f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}_{hash.md5}{ext}" --exec + +# Not include time +f2 --sort=mtime --replace "{xt.ImageSize}_{hash.md5}{ext}" --exec # Remove space in directory f2 --find " " --replace "_" --string-mode --only-dir --exec