rename: update layout
This commit is contained in:
parent
99560e71bc
commit
2a67acf5c1
36
rename.md
36
rename.md
|
@ -1,24 +1,40 @@
|
||||||
---
|
---
|
||||||
title: rename
|
title: rename
|
||||||
category: CLI
|
category: CLI
|
||||||
|
layout: 2017/sheet
|
||||||
---
|
---
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
# http://plasmasturm.org/code/rename/
|
```bash
|
||||||
brew install rename
|
brew install rename
|
||||||
|
```
|
||||||
|
|
||||||
### Examples
|
See: <http://plasmasturm.org/code/rename/>
|
||||||
|
|
||||||
# Rename hello.txt to world.txt and so on
|
### Regex substitution
|
||||||
rename 's/hello/world/' *.txt
|
|
||||||
|
|
||||||
# Search and replace
|
```bash
|
||||||
rename -s .png .jpg.png *.png
|
rename 's/hello/world/' *.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
Rename `hello.txt` to `world.txt` and so on in `*.txt`.
|
||||||
|
|
||||||
|
### Replace extension
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rename -s .png .jpg.png *.png
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace `.png` with `.jpg.png` in `*.png`.
|
||||||
|
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
-n # Simulation
|
| `-n` | Simulation
|
||||||
-l # Symlink instead of rename
|
| `-l` | Symlink instead of rename
|
||||||
-i # Interactive
|
| `-i` | Interactive
|
||||||
|
|
||||||
|
## Also see
|
||||||
|
|
||||||
|
- [Rename website](http://plasmasturm.org/code/rename/) _(plasmasturm.org)_
|
||||||
|
|
Loading…
Reference in New Issue