Get the App
SLTechnology News&Howtos  ›  Development  › 

How shell batch renames Files

Shulou Source: shulou.com Published: 2022-06-01 04:06:05 09月22日 Update

This article will explain in detail how shell renames files in batches. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Batch rename Fil

Add a .bak suffix to all txt files:

Rename '.txt' '.txt.bak' * .txt

Remove all bak suffixes:

Rename'* .bak'* .bak

Change all the spaces to underscores:

Find path-type f-exec rename's / / _ / g'{}\

Change the file names to uppercase:

What is find path-type f-exec rename'Accord? Shell is a program written in C language. It is a bridge for users to use Linux. Shell is both a command language and a programming language. Shell also refers to an application that provides an interface through which users access the services of the operating system kernel.

This is the end of the article on "how to rename files in batches in shell". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Files programs articles languages suffixes applications more users interfaces applications good practical operating systems underscores content kernel and again capital commands uppercase Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Xiaomi MariaDB Shulou Technology MySQL