Replace spaces in filename

ls | while read -r FILE; do mv -v "$FILE" `echo $FILE | tr -d ' '`; done
all files in the directory get moved, in doing so the new name of the file is the original name with out spaces (using translate command)

-3
2010-08-14 14:10:48

2 Alternatives + Submit Alt

What Others Think

Great survey. I'm sure you're getting a great response. Zonnepanelen Drogenbos
seomind · 4 weeks and 5 days ago
Thanks for providing recent updates regarding the concern, I look forward to read more. Zonnepanelen Haacht
seomind · 4 weeks and 5 days ago
Your work is very good and I appreciate you and hopping for some more informative posts Zonnepanelen Galmaarden
seomind · 4 weeks and 5 days ago
I will really appreciate the writer's choice for choosing this excellent article appropriate to my matter.Here is deep description about the article matter which helped me more. Zonnepanelen Halle
seomind · 4 weeks and 5 days ago
What a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up. Zonnepanelen Glabbeek
seomind · 4 weeks and 5 days ago
I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article. Zonnepanelen Herent
seomind · 4 weeks and 5 days ago
With so many books and articles coming up to give gateway to make-money-online field and confusing reader even more on the actual way of earning money, Zonnepanelen Grimbergen
seomind · 4 weeks and 5 days ago
this blog was really great, never seen a great blog like this before. i think im gonna share this to my friends.. Zonnepanelen Keerbergen
seomind · 4 weeks and 5 days ago
Great post! I am actually getting ready to across this information, is very helpful my friend. Also great blog here with all of the valuable information you have. Keep up the good work you are doing here. Zonnepanelen Haacht
seomind · 4 weeks and 5 days ago
This is a splendid website! I"m extremely content with the remarks!. Zonnepanelen Herne
seomind · 4 weeks and 5 days ago
The writer is enthusiastic about purchasing wooden furniture on the web and his exploration about best wooden furniture has brought about the arrangement of this article. Zonnepanelen Halle
seomind · 4 weeks and 5 days ago
Great Article it its really informative and innovative keep us posted with new updates. its was really valuable. thanks a lot. Zonnepanelen Hoeilaart
seomind · 4 weeks and 5 days ago
Welcome to the party of my life here you will learn everything about me. Zonnepanelen Herent
seomind · 4 weeks and 5 days ago
Thank you so much for ding the impressive job here, everyone will surely like your post. Zonnepanelen Holsbeek
seomind · 4 weeks and 5 days ago
wow... what a great blog, this writter who wrote this article it's realy a great blogger, this article so inspiring me to be a better person Zonnepanelen Herne
seomind · 4 weeks and 5 days ago
I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. Zonnepanelen Huldenberg
seomind · 4 weeks and 5 days ago
This is really very nice post you shared, i like the post, thanks for sharing.. Zonnepanelen Hoegaarden
seomind · 4 weeks and 5 days ago
This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck Zonnepanelen Kampenhout
seomind · 4 weeks and 5 days ago
Nice knowledge gaining article. This post is really the best on this valuable topic. Zonnepanelen Hoeilaart
seomind · 4 weeks and 5 days ago
You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. Zonnepanelen Kapelle-op-den-Bos
seomind · 4 weeks and 5 days ago
I have checked this link this is really important for the people to get benefit from. Zonnepanelen Holsbeek
seomind · 4 weeks and 5 days ago
Thank you so much for ding the impressive job here, everyone will surely like your post. Zonnepanelen Kortenaken
seomind · 4 weeks and 5 days ago
My friend mentioned to me your blog, so I thought I’d read it for myself. Very interesting insights, will be back for more! Zonnepanelen Huldenberg
seomind · 4 weeks and 5 days ago
The blog and data is excellent and informative as well Zonnepanelen Kortenberg
seomind · 4 weeks and 5 days ago
The web site is lovingly serviced and saved as much as date. So it should be, thanks for sharing this with us. Zonnepanelen Kampenhout
seomind · 4 weeks and 5 days ago
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it. Zonnepanelen Kraainem
seomind · 4 weeks and 5 days ago
Admiring the time and effort you put into your blog and detailed information you offer!.. Zonnepanelen Kapelle-op-den-Bos
seomind · 4 weeks and 5 days ago
Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. Zonnepanelen Landen
seomind · 4 weeks and 5 days ago
I think about it is most required for making more on this get engaged Zonnepanelen Keerbergen
seomind · 4 weeks and 5 days ago
If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries Zonnepanelen Drogenbos
seomind · 4 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: