LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-21-2004, 08:09 PM   #1
buffed317
Member
 
Registered: Jun 2004
Location: New Jersey, USA
Distribution: Slackware 11
Posts: 191

Rep: Reputation: 31
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?
 
Old 07-21-2004, 09:26 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
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]$
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
determining file types supersucker Linux - Newbie 2 05-03-2005 12:29 PM
Getting text from different file types jedson Mandriva 2 12-14-2004 01:36 PM
can't set file types and programs r.stiltskin Red Hat 0 11-01-2004 11:13 PM
file types jclark00001 Linux - Newbie 2 02-17-2003 03:07 PM
File types in KDE ChimpFace9000 Linux - Newbie 1 04-23-2002 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration