Skip to content

Instantly share code, notes, and snippets.

@fearphage
Last active April 7, 2016 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fearphage/2cc61f52892cd3ac858313c4c41fdfd7 to your computer and use it in GitHub Desktop.
Save fearphage/2cc61f52892cd3ac858313c4c41fdfd7 to your computer and use it in GitHub Desktop.

Dropbox has a long-standing bug with changing case of files and directories. This is a work around.

It renames the directoy name to name+1 and then to lowercase name.

Example

  1. CatPants is renamed to CatPants1
  2. CatPants1 is then renamed to catpants
for x in $(find * -type d | egrep '[A-Z]');
do
mv $x ${x}1;
mv ${x}1 $(echo $x | tr '[A-Z]' '[a-z]');
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment