Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have been struggling to figure out how to rename multiple music files. I usually like to name my music files in a "artist~CD~track~title" or "CD~track~artist~title" format. However, sometimes I don't like the way the naming came out, and want to change the artist or CD name. I know I can do it by using the mouse and renaming that way, but it gets tiring, especially when I know there is some way to do it from the command line.
Part of my problem with the command line was dealing with the spaces in my files. I prefer to have spaces because it really does make it much easier to read, as opposed to using the underscore. Anyway, I kept running into problems using the "mv" command to try and rename them. Finally, I lighted upon the rename command, and after a few more trials and errors, got it to work. Here is the command I gave it. Hopefully it will save you some time.
First, I wanted to insert a "Volume 1" designation into the title of a CD that didn't have one.
So, I gave the command: rename "The Best of Tchaikovsky" "The Best of Tchaikovsky V1" The*
The quotes keep the file name together. This then replaces each instance of "The Best of Tchaikovsky" with the same thing plus a V1. No wildcards necessary, as it finds the matches automatically. In fact, it messes it up if you stick a wildcard on the end. The final argument, The*, chooses every file in the directory starting with "The" to make the change to.
I hope this helps you keep your music or other types of files with long names and spaces in line. I think the rename works much better than mv for these, as I havn't got mv to work like this. Although I am sure that someone with more knowledge than me knows many ways of doing this.