Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 12th, 2012  |  syntax: None  |  size: 0.45 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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$
clone this paste RAW Paste Data