• Home
  • Downloads
  • Contact Us
  • Report Broken Link
Friday, May 9, 2025
  • Login
lessons4you.info
  • Videos
  • Downloads
  • Help
    • Contact Us
    • Report Broken Link
No Result
View All Result
  • Videos
  • Downloads
  • Help
    • Contact Us
    • Report Broken Link
No Result
View All Result
Lessons4you.info
No Result
View All Result

How to Change Filenames to UPPERCASE Case in Linux

How to Change Filenames to tOggLe Case in Linux

How to Change Filenames to lowercase Case in Linux

by
December 11, 2021
in Uncategorized
Reading Time: 1 min read
A A
Share on FacebookShare on Twitter

Many time you may need to change the file or folder name case, for example lower to upper, upper to lower or toggle the case. I am giving you to the best solution to change the folder name case. We need to create a command for easy access. First of all create a script in “/usr/local/bin” folder and give it the execute permission, so any user can access this function as a command. I named this script lcf (lower case file) but you can user your name that you can easily remember and identify. Note: You need super user privilege.

Create a script and put this script named “lcf” in /usr/local/bin and type “chmod a+x lcf”.

1
2
3
 
sudo vi /user/local/bin/lcf
 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
#!/bin/sh
# uppercase any filenames with lowercase chars
for file in $*
do
if [ -f $file ]
then
  lcfile=`echo $file | tr '[:upper:]' '[:lower:]'`
  if [ $file != $lcfile ]
  then
    mv -i $file $lcfile
  fi    
fi
done
 

1
2
3
 
sudo chmod a+x /user/local/bin/lcf
 

Uses:

1
2
3
4
5
6
7
 
$ lcf
 
OR
 
$ lcf  [  ...]
 

Chage all file in a folder:

1
2
3
 
$ lcf `ls *`
 

Tags: Change Case
Previous Post

How to Change Filenames to UPPERCASE Case in Linux

Next Post

How to Change Filenames to tOggLe Case in Linux

Related Posts

How To Install The TWRP Recovery on Xiaomi Redmi 1s
Uncategorized

How To Install The TWRP Recovery on Xiaomi Redmi 1s

May 14, 2022
MIUI Collection Of Gapps (2.3.x – 5.0.x)
Uncategorized

MIUI Collection Of Gapps (2.3.x – 5.0.x)

May 14, 2022
Download Android 5.1.x Lollipop PA Gapps
Uncategorized

Download Android 5.1.x Lollipop PA Gapps

May 15, 2022
Download gapps for Android 5.1 Lollipop Cyanogemod 12.1
Uncategorized

Download gapps for Android 5.1 Lollipop Cyanogemod 12.1

May 14, 2022
Reddit AMA with OxygenOS Team OnePlus
Uncategorized

Reddit AMA with OxygenOS Team OnePlus

May 14, 2022
How to Remove Adobe Updater from OS X Menu Bar?
Uncategorized

How to Remove Adobe Updater from OS X Menu Bar?

July 19, 2023
Next Post

How to Change Filenames to tOggLe Case in Linux

  • Home
  • Downloads
  • Contact Us
  • Report Broken Link

© 2022 lessons4you.info

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Videos
  • Downloads
  • Help
    • Contact Us
    • Report Broken Link

© 2022 lessons4you.info