jensheidrich.de
  • Home
  • Kategorien
  • Tags
  • Archiv
  • Wunschliste

rename files for crappy filesystems

If you want to share files with, let’s say Windows-Users, their filesystems cannot handle files with special characters like < > ? : | \ *

On Linux you can rename the files with one single command:

for i in \< \> \? \: \| \\ \*;do find . -type f -name "*\\$i*" \ -exec rename "s/\\$i/_/" {} \;;done

Test the renaming with switch -n to the rename-command. For including directory-names omit the find-switch -type f.

Share on: Twitter ❄ Facebook ❄ E-Mail

  • « Song of the Day: Shine On You Crazy Diamond
  • Pello und Max: Das Geheimnis der Zeitblase »

Datum

06.02.2010

Kategorie

Hack

Tags

  • console 3
  • jensheidrich.de - parts of a memory dump
  • Impressum Datenschutz
  • Powered by Pelican. Theme: Elegant by Talha Mansoor