Skip to primary content
Skip to secondary content

Muthii's blog

Just another page out of my life

Muthii's blog

Main menu

  • Home
  • About

Tag Archives: remove spaces with sed

Remove spaces from filenames

Posted on August 10, 2009 by muthii
Reply

Removing spaces from filelemanes can be archived using various methods. The command below uses sed to do this, before running it make sure you are in the folder containing the files whose names you want to change.

for file in *; do mv "$file" `echo $file | sed -e 's/  */_/g' -e 's/_-_/-/g'`; done
Posted in Computer, Linux Scripts | Tagged remove spaces from filenames, remove spaces with sed | Leave a reply
August 2022
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Jul    

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Recent Posts

  • No appropriate protocol
  • Update Remi PHP to next version
  • Running KVM and docker on the same host with a bridge
  • WordPress database migration from hell
  • Pay a Finance service or Personally manage your retirement funds?

Tags

  • Address already in use
  • Atlanta linux fest
  • Auto update last edit date
  • Backup
  • BeginDateformat
  • copy files from cmd line with samba
  • copy files to windows share
  • cups-pdf
  • disk restore
  • DIY
  • Dovecot unable to connect
  • error 17
  • freenx
  • Getting in shape
  • gmail shortcuts
  • grub error 17
  • hard times
  • HD video player
  • Imap
  • k3b video dvd error
  • keeping fit
  • kvm
  • Last edit date
  • linux compatible
  • movie list
  • movie release by year
  • movie year
  • network pdf printer
  • nx
  • NX unable to connect to 127.0.0.1
  • obama nomination speech
  • Obama wins election
  • Oline video
  • Pdf printer
  • php and apache
  • pysqlite2
  • Secure squirrelmail
  • securing ssh
  • squirrelmail with ssl
  • ssh
  • ssl squirrelmail
  • star trek
  • tv dinners
  • weight loss
  • wordpress ssl login
Proudly powered by WordPress