![]() To batch rename all files with lower case names to upper case. Convert all Lowercase to Uppercase and Vise-Versa So, if you want to get the details of rename command (like we did using “ -n” option), here we use “ -v” option to print the complete details of all the changes done by rename command successfully. We saw that the rename command didn’t displayed any information of changes it does. Note: The above command output only displays changes, but in real the changes are not done, unless you run the command without “ -n” switch. :~$ rename -n 's/\.php$/\.html/' *.phpĮntertainment.php renamed as entertainment.html Here, is the example of the command below. The “ -n” parameter will tell you exactly what changes would take place, but the changes are not done for real. While doing critical or major renaming tasks, you can always check the changes by running rename command with “ -n” argument. Check Changes Before Running Rename Command Now you can see above that all the html files are renamed to php. rw-rw-r- 1 ravisaive ravisaive 978137 Oct 10 12:11 sports.php rw-rw-r- 1 ravisaive ravisaive 938937 Oct 10 12:11 photos.php rw-rw-r- 1 ravisaive ravisaive 938895 Oct 10 12:10 news.php rw-rw-r- 1 ravisaive ravisaive 6538895 Oct 10 12:10 lifestyle.php rw-rw-r- 1 ravisaive ravisaive 588895 Oct 10 12:10 entertainment.php rw-rw-r- 1 ravisaive ravisaive 6888896 Oct 10 12:10 cricket.php php” extension, doing ls -l on the prompt. Let’s verify whether all files are renamed to “.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |