summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaligule <Code@schauderbasis.de>2016-04-05 14:35:24 +0200
committerKarel Zak <kzak@redhat.com>2016-04-06 13:43:57 +0200
commit7d85a7e96621291b0b65cac77b3a262d9deb4ade (patch)
treef8a25a92a9018aa955991cb5d248df4641f9bfea
parentd551d668917d4a247571a295729d3c51b789dd91 (diff)
downloadutil-linux-7d85a7e96621291b0b65cac77b3a262d9deb4ade.tar.gz
rename: add example to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--misc-utils/rename.19
1 files changed, 9 insertions, 0 deletions
diff --git a/misc-utils/rename.1 b/misc-utils/rename.1
index f63d2f268..d3439bd2f 100644
--- a/misc-utils/rename.1
+++ b/misc-utils/rename.1
@@ -50,6 +50,15 @@ rename .htm .html *.htm
.PP
.RE
will fix the extension of your html files.
+Provide an empty string for shortening:
+.RS
+.PP
+.nf
+rename '_with_long_name' '' file_with_long_name.*
+.fi
+.PP
+.RE
+will remove the substring in the filenames.
.SH WARNING
The renaming has no safeguards. If the user has permission to rewrite file names,
the command will perform the action without any questions. For example, the