Đàm Ngọc Lan
New member
How do I search for and rename a file in Linux?
Answer
Renaming Files with the mv Command
Answer
Renaming Files with the mv Command
- mv [OPTIONS] source destination.
- for f in *.html; do mv — “$f” “${f%.html}.php” done.
- find . – depth -name “*.html” -exec sh -c ‘f=”{}”; mv — “$f” “${f%.html}.php”‘ ;
- rename [OPTIONS] perlexpr files.