Question about creating files, and upper and lower case letters
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Question about creating files, and upper and lower case letters
What is the programme that writes files on to the hard drive? and then writes the filename to creates the inodes (?)
To give an example, say Im downloading a file called 'Match Of The Day.avi. Is there an option to the programme that is handling the writing of the file to the hard drive to write all the letters in the filename to lower-case?
Your first question ultimately refers to system calls and filesystem operations. Not going to speak to that, when I think your real (much simpler) question is:
Quote:
Originally Posted by clifford227
To give an example, say Im downloading a file called 'Match Of The Day.avi. Is there an option to the programme that is handling the writing of the file to the hard drive to write all the letters in the filename to lower-case?
It depends on the program you're using to download the file. If you're using wget(1), for instance, there is an -O (that's a capital "o") option that can be used like so:
@clifford227: At second read, I think you're actually asking whether you can keep the name, but convert it to lower case. I can only think of contrived scripting methods for doing so. Don't know of any tidy program option.
wget(1)'s --restrict-file-names may be promising, but I've never tested it.
If you use find with the -iname option instead of the -name option you have the same effect: a case-insensitive search.
I did try the -iname option, but I was getting some strange results.
(Although it is possible that I wasnt using the find command properly. I had a hard time following the man page.)
If I remember, if there was only one file with a name containing a search word, find would find it and print it to the screen, but if there were two files that contained the search word, find wouldnt list either, or it would only find a case-sensitive match (I cant quite remember exactly, but find wasnt giving me the results I expected).
Last edited by clifford227; 08-22-2012 at 07:27 PM.
The 'iname' option is not always available; depends on the implementation of 'find' in the distro. I ran into that problem last night while using DSL. And the error message in this case left a lot to be desired
The 'iname' option is not always available; depends on the implementation of 'find' in the distro. I ran into that problem last night while using DSL. And the error message in this case left a lot to be desired
That is because DSL uses the find program that is inbuilt to Busybox, for space reasons. Most Busybox versions of commands come with a reduced feature set, otherwise they would take the same space as the GNU and BSD versions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.