How do I search for and rename a file in Linux?

How do I search for and rename a file in Linux?
Answer
Renaming Files with the mv Command
  1. mv [OPTIONS] source destination.
  2. for f in *.html; do mv — “$f” “${f%.html}.php” done.
  3. find . – depth -name “*.html” -exec sh -c ‘f=”{}”; mv — “$f” “${f%.html}.php”‘ ;
  4. rename [OPTIONS] perlexpr files.
12 февр. 2020 г.
 

Tìm kiếm

Back
Top