SHARE
TWEET

Untitled

a guest Jul 12th, 2012 45 Never
  1. mattias@waderbook:~/test$ rm -rf *
  2. mattias@waderbook:~/test$ mkdir A B
  3. mattias@waderbook:~/test$ touch "A/FooBar - Title" "B/FooBar - Title"
  4. mattias@waderbook:~/test$ find .
  5. .
  6. ./A
  7. ./A/FooBar - Title
  8. ./B
  9. ./B/FooBar - Title
  10. mattias@waderbook:~/test$ find . -exec rename 's/^.* - //' {} +
  11. './B/FooBar - Title' not renamed: 'Title' already exists
  12. mattias@waderbook:~/test$ find .
  13. .
  14. ./A
  15. ./B
  16. ./B/FooBar - Title
  17. ./Title
  18. mattias@waderbook:~/test$
RAW Paste Data
Top