0

I have read quite a few questions here and on the interwebz, however my file renaming still doesn't work. I've got a bunch of files that starts as follows:

libraryVCE_KM_LIBRARY_SUMARY_S...

I want to remove the first instance of library, so I run this command in linux:

rename -v '/\blibrary/' *

However no files are renamed. Why not?

2 Answers 2

2

Try this:

rename 's/^library//' *
Sign up to request clarification or add additional context in comments.

1 Comment

@Sniffer. That's Perl substitution operator. s///.
1

I tried this:

rename library '' *

And it seems to work.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.