Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-09-2007, 06:05 AM   #1
Registered: Aug 2006
Posts: 51

Rep: Reputation: 16
Removing special characters from filenames

I have a load of files that are named "", "" etc ..

I would like to remove the " from the filenames using single shell command rather than manually renaming them all. I have experimented with various commands but they don't remove the special character (") from the filename.

What command should I use to rename the files ?

Old 08-09-2007, 06:11 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
for file in \"*\"; do
   mv "$file" "${file//\"/}"


remove, rename

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
removing file with special characters rsashok Linux - General 4 02-09-2010 05:08 PM
Strip special characters from filenames General Linux - Software 1 05-14-2006 04:49 AM
Special characters in filenames gmartin Linux - General 2 01-05-2006 09:22 PM
bash and filenames with special characters CoolAJ86 Programming 2 03-09-2005 03:50 PM
smbclient and filenames with special characters cloro_x Linux - Newbie 0 07-30-2001 05:15 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:07 PM.

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