1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-06-16 07:07:37 +02:00
cheatsheets/rename.md
2018-03-03 08:07:10 +08:00

683 B

title category layout
rename CLI 2017/sheet

Installation

brew install rename

See: http://plasmasturm.org/code/rename/

Regex substitution

rename 's/hello/world/' *.txt

Rename hello.txt to world.txt and so on in *.txt.

Replace extension

rename -s .png .jpg.png *.png

Replace .png with .jpg.png in *.png.

Options

Option Description
-n Simulation
-l Symlink instead of rename
-i Interactive

Also see