LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-20-2004, 12:29 AM   #1
pas
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Rep: Reputation: 0
copy files and make all filenames uppercase


Hello,

Is there any way to convert filename in uppercase while copying them to another directory?

Thank you.
 
Old 12-20-2004, 12:39 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Sure -- something like:

for i in `ls *`; do cp $i /new/directory/`echo $i | tr [a-z] [A-Z]` ; done

This assumes that all your files are in one directory with no subdirectories, and that the place you want to copy them to is /new/directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you make long filenames with mkisofs? Huddlebum Linux - Newbie 2 11-11-2012 07:03 PM
samba replaces Uppercase char in filenames to lowercase srikz Other *NIX 3 03-03-2006 09:59 AM
backup files, tar, do i need to make a copy dtra Linux - Software 3 05-10-2005 09:52 PM
samba replaces Uppercase char in filenames to lowercase srikz Red Hat 1 10-26-2004 04:47 AM
uppercase files not showig on webserver woho Linux - Software 1 11-05-2003 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration