Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mattias@waderbook:~/test$ rm -rf *
- mattias@waderbook:~/test$ mkdir A B
- mattias@waderbook:~/test$ touch "A/FooBar - Title" "B/FooBar - Title"
- mattias@waderbook:~/test$ find .
- .
- ./A
- ./A/FooBar - Title
- ./B
- ./B/FooBar - Title
- mattias@waderbook:~/test$ find . -exec rename 's/^.* - //' {} +
- './B/FooBar - Title' not renamed: 'Title' already exists
- mattias@waderbook:~/test$ find .
- .
- ./A
- ./B
- ./B/FooBar - Title
- ./Title
- mattias@waderbook:~/test$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement