Home /Renaming multiple files at a time
Error message
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/drupal/includes/common.inc).
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/drupal/includes/common.inc).
- Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2405 of /var/www/drupal/includes/menu.inc).
Renaming multiple files at a time
Submitted by drjunior on Wed, 05/29/2013 - 22:27
This command took me 20 minutes to find. Let's hope that this helps someone and me next time I need to do something similar.
find . -name '*foo*' -type f -exec bash -c 'mv "$1" "${1/foo/bar}"' -- {} \;