User Tools

Site Tools


linux:find

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
linux:find [2024/11/18 12:59] Wulf Rajeklinux:find [2025/02/11 21:14] (current) Wulf Rajek
Line 74: Line 74:
 find . -type f -name "*\[*" -print0 | xargs -r0 rename 's/(.*) \[(\d\d\d\d?p)\](.*)/$1.$2$3/' -- find . -type f -name "*\[*" -print0 | xargs -r0 rename 's/(.*) \[(\d\d\d\d?p)\](.*)/$1.$2$3/' --
 </code> </code>
 +
 +Recursive file renaming extension (e.g. from "something.oldext" to "something.newext") :
 +<code>
 +find . -type f -name '*.oldext' -print0 | xargs -0 rename 's/\.oldext/\.newext/'
 +</code>
 +
  
 Move files in subdirectories to other directory while retaining directory structure Move files in subdirectories to other directory while retaining directory structure
linux/find.txt · Last modified: 2025/02/11 21:14 by Wulf Rajek