Amazon.co.uk Widgets

Log in

X
Lowercasing Files Using Zip

When working with a large number of files, renaming them to lowercase can be tedious. A quick and effective method is to use the following zip and unzip commands:

zip -r foo.zip foo/*
unzip -LL foo.zip

TL:DR – This approach creates a compressed archive of the directory and extracts it while converting all filenames to lowercase.

Strengths & Weaknesses

StrengthsWeaknesses
Simple and efficient for bulk renaming Requires additional disk space for temporary zip file
Works across multiple file types File timestamps may be altered
Preserves file structure Does not work well with symbolic links