LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   changing file types (https://www.linuxquestions.org/questions/linux-general-1/changing-file-types-208069/)

buffed317 07-21-2004 08:09 PM

changing file types
 
i burned mp3s to a cd and the end of the filenames were cut out. now they arent reconized as any type of file. is there a way to add the mp3 part to the filename through bash?

Dark_Helmet 07-21-2004 09:26 PM

You don't mean you want to rename them on the CD do you? Just checking...

There's an easy way to do it from the command line provided the files are on a read/write filesystem:

assuming the mp3s are the only files in the directory you execute this command from
Code:

[me@myhost some_dir]$ for file in *
> do
> mv -v ${file} ${file}.mp3
> done
lots of output
[me@myhost some_dir]$



All times are GMT -5. The time now is 07:37 AM.