summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorKaligule2016-04-05 14:35:24 +0200
committerKarel Zak2016-04-06 13:43:57 +0200
commit7d85a7e96621291b0b65cac77b3a262d9deb4ade (patch)
treef8a25a92a9018aa955991cb5d248df4641f9bfea /misc-utils
parentlib/strutils: use int for fgetc() (diff)
downloadkernel-qcow2-util-linux-7d85a7e96621291b0b65cac77b3a262d9deb4ade.tar.gz
kernel-qcow2-util-linux-7d85a7e96621291b0b65cac77b3a262d9deb4ade.tar.xz
kernel-qcow2-util-linux-7d85a7e96621291b0b65cac77b3a262d9deb4ade.zip
rename: add example to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-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