Answers for "lowercase file linux"

1

convert all files to lowercase using shell script

#!/bin/sh

for x in `ls`
  do
  if [ ! -f $x ]; then
    continue
    fi
  lc=`echo $x  | tr '[A-Z]' '[a-z]'`
  if [ $lc != $x ]; then
    mv -i $x $lc
  fi
  done
Posted by: Guest on September-08-2020
1

convert all file names to lowercase linux

# install rename
# in directory:
rename 'y/A-Z/a-z/' *
Posted by: Guest on January-08-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language