General :: Check If Filenames Are Lowers Case?
Feb 5, 2010What would be the best way to verify files in a folder are all lower case and if a file is not lower case, output the filename to the screen.
View 11 RepliesWhat would be the best way to verify files in a folder are all lower case and if a file is not lower case, output the filename to the screen.
View 11 RepliesIs there a way of making rsync (an offspring of rcp) case insensitive? Perhaps mounting the file system (not linux) in some special way?
View 14 Replies View RelatedI downloaded a source code package for an old multi-platform game. unfortunately, the author, when he created the .zip archive of the source code, zipped it in DOS, and so all of the file names are in all caps. when i run the configure script, it errors out, not being able to find any of the files (which originally were in lower case.
so, other than the extremely tedious process of renaming each file, one by one, is there any way to fix this so it will build properly? this game was written in 1996, so i don't think i'm the first person to bump into this problem.
I got a filename called like this:
beach---------20090808-110000.ogg
beach---------20090808-120000.ogg
It's like this:
name----------YYYYMMDD-hhmmss.ogg
Now Im splitting these hourly files into 1 minute files. I get then this output sofar properly:
beach---------20090808-110000_00.mp3
beach---------20090808-110000_01.mp3
beach---------20090808-110000_02.mp3
and so on....
the 00, 01, 02 and up are the minutes it has splitted it. Now I need a script, after it did this, to rename the file names into this:
beach---------20090808-110000.mp3
beach---------20090808-110100.mp3
beach---------20090808-110200.mp3
beach---------20090808-110300.mp3
Kernel 2.6, Slackware 12.0
mkisofs 2.01
I do 'mkisofs -iso-level 1 -o image John Smith.txt'. Only an example. When I mount image, ls outputs john_smi.txt. So it has shorten to 8.3 and translated ' ' into '_'. This is in accordance with the manual, although it doesn't say the conversion will be done.
Quote:
-iso-level level
.........................
With all iso9660 levels from 1..3, all filenames are restricted to upper case letters, numbers and the underscore (_).
...........................
However, as it did not reject the file name, it should have converted it to all upper case, it seems to me. And -iso-level 2|3 does the same thing.
Code:
root@darkstar:~# mkisofs -iso-level 1 -o image John Smith.txt
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
[code]....
I believe I'm running Kubuntu 10.04, but don't quote me on that. Here's the version string from dmesg. Linux version 2.6.32-31-generic (buildd@crested) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #60-Ubuntu SMP Thu Mar 17 22:15:39 UTC 2011 (Ubuntu 2.6.32-31.60-generic 2.6.32.32+drm33.14 I have an emergent problem with my wired ethernet resetting the connection on a frequent basis. When it resets it re-negotiates the link speed and I often end up with a 10Mb/s link and on some occasions a 100Mb/s. The configured speed for the link is 1000Mb/s full duplex using a preup ethtool command. I do not use NetworkManager but have the interface configured in /etc/network/interfaces.
[code]....
I tried to add my wife , and when I put in a password for her, this error comes up."Please set a valid user name consisting of a lower case letter followed by lower case letters and numbers." I did all that and I still can't set a password for her.
View 3 Replies View RelatedI've written a simple perl code to learn switches in perl.My code is pasted below,
#!/usr/bin/perl
$opt = 1;
switch($opt) {
[code]...
list filenames one-per-line, in BASH without including directories. I think he was either wrong or making that up. There is a way to list just the names and one per line but there aren't any arguments I can find that can be used to exclude directories.
Code:
IFS=', '; files=`ls -m`; for i in $files; do if [ -f $i ]; then echo $i; fi; done That does only use ls as a command, however he said his GSI thought he could do it without all that...
Quote:
ricky@ricky-desktop:~$ ls -l
total 1376
drwxr-xr-x 2 ricky ricky 4096 2010-10-02 22:17 Azureus Downloads
drwxr-xr-x 4 ricky ricky 4096 2010-10-02 22:16 Desktop
[code]....
I am using Red hat linux .. i just wanted to know, is it possible to arrange or sort filenames numerically?i have saved several files with the follwing names : 1.png, 2.png, 3.png, 4.png ...... 11.png 12.png. and so on.... but the containing folder sorts this alphabetically in the following manner 11,12,13...... 1, 2, 3, and so on...
View 6 Replies View Relatedif i have a dir with several mp3's files:
example:
[root@xxx]ls -l
-rwxr-xr-x 1 web2 client1 6222573 Nov 26 17:34 01 Artist1 - Song1.mp3
-rwxr-xr-x 1 web2 client1 4989384 Nov 26 17:34 02 Artist2 - Song2.mp3
-rwxr-xr-x 1 web2 client1 6987438 Nov 26 17:36 03 Artist3 - Song3.mp3
and i need to update the id3 tag of all files with the command:
/usr/bin/id3v2 -a "Artist1" -t "Song1" Artist1 - Song1.mp3
how i do a loop to read the filename and execute the id3v2 command for each file, as i have filenames with spaces and special chars ex:"".
I am trying to synchronize the content of the directory my_dir/ from /home to /backup. This directory contains a file which name has a double quote in it, such as to"to. Here is my rsync command:
rsync -Cazh /home/my_dir/ /backup/my_dir/
And I get the following message:
rsync: mkstemp "/backup/my_dir/.to"to.d93PZr" failed: Invalid argument (22)
For info, rsync works well when the synchronized filenames contain single quote, parenthesis and space. Thus, why is it bugging with a double quote?
I have a ton of files that are timestamped directories. These all look like2011-06-24_13.53.36 // a directory name for june 24th, 1:53:36 pmI have thousands of these directories. I want to do operations on some of the older ones. Let's say I give it a string for date time that matches that exact format, like i'll give it2011-06-25_00.00.00 // june 25th, 12amI want to find all the directories BEFORE my time. So if i give the string for 12am on june 25th, i want to find all the directories before then.If not i can find EVERY directory i have like this and then filter after wards. The created/modified dates are not tied to the actual timestamp im looking for (that would make this easier)
View 2 Replies View RelatedI tried to move a file from my desktop to another folder; moving it was not allowed, for some reason. Neither was opening it and saving a new copy in the target folder. Would that be because the filename contains double (") quotation marks? Are they not allowed? The filename is Edit of Bob's "Lady Liberty" Article.doc. [Filename not enclosed in quotation marks here, to avoid confusion.]I just changed the double quotation marks to single quotation marks; that solved everything.
View 2 Replies View RelatedI've been surfing and searching the net quit a while now to make my own script, but I haven't been really successful ever since I want to make a script which can remove strings from my mp3 collection (file names).
For example:
Code:
101-bob_sinclar_feat_sean_paul-tik_tok_(radio_edit).mp3 --> bob_sinclar_feat_sean_paul-tik_tok_(radio_edit).mp3
10-Young Jeezy-Lose My Mind (78 Bpm) (Repack).mp3 --> young_jeezy-lose_my_mind.mp3
Now the problem is how can I remove the strings like:
101 & 10 (dynamic)
(%%% Bpm) (dynamic)
(Repack) (static)
I have a file that contains "ls -la" output. I would like to display only the filenames, none of the other information before it such as permissions, ownership, size, and date.Would the cut command be the best way to hit this, or should I use Vim or sed?
View 6 Replies View RelatedHaving problems displaying French chars. They are dumped into an nfs share by a Windows/cifs configuration which has been blamed for this unwanted behavior but when I transfer a file continaing � via WinSCP to the RedHat, instead of getting the filename Response.txt I see R?sponse.txt. When I refresh WinSCP to view the file it views it ok.
[Code].....
I am trying to write a bash script to delete a file where I know the first part of the name, but it has spaces in it. The second part of the file name is a random set of characters. I was hoping to use a wildcard for this, but I keep getting a error massage saying file or directory does not exist. This is a simplified form of my script:
Code:
MYFILE=This is my file
rm "$MYFILE*"
The file may be something like "This is my file.123abc456.suffix"
Fox example.I want to rename the files below like this: test1.png、test2.png.....
-rw-rw-r--. 1 test test 20448 2010-12-08 20:11 2010-12-08-212440_1440x900_scrot.png
-rw-rw-r--. 1 test test 29799 2010-12-08 21:25 2010-12-08-212526_369x331_scrot.png
-rw-rw-r--. 1 test test 34167 2010-12-08 23:54 2010-12-08-235424_580x328_scrot.png
-rw-rw-r--. 1 test test 155202 2010-12-08 23:55 2010-12-08-235511_1440x900_scrot.png
I would like to search a specific directory and pull out filenames that have this pattern: "_bsc_" Then I want to do some processing and move the file to another directory
View 5 Replies View RelatedCan anyone offer a code snippet to recursively go through directories and replace any single or double quotes quotes found in a filename with another character (e.g. "_").If any of the filenames contain a single quote or double quote, then replace it with an underscore.
View 7 Replies View RelatedI have some checksums.md5 verification files from an ntfs external drive, but using windows notation: instead of /, spaces between file names (not escaped), reserved shell characters (like (, &, ', to name a few). The checksums.md5 has a bunch of checksums and filenames:
[code]...
I want to use this checksums.md5 to verify the files that I've copied to my machine: but I'm on a Linux, so I need to convert the names inside checksums.md5 from Windows to Linux to use the md5sum utility from the shell. The first line in my example would become: f12f75c1f2d1a658dc32ca6ef9ef3ffc My Windows & Files (2010)/[bak]/testing.wmv Is there some application for this (converting a file listing, from windows cmd notation, to linux shell notation) or will I need to create a bash script using sed that just "replaces" what is "wrong" with the filenames
I have an external harddrive which is fat32 (which was filled when I was on a windows system) with a lot of files on (> 200gb) which have mixed case filenames. I wanted to write a script to rename them all to lowercase however when I did I got an error saying that the filenames are the same (which I guess is true as FAT is case-insensitive). My issue is that I'm mounting this from a linux box now so it would make it a lot easier if things were lower case! I've already run a script to replace all spaces with underscores.
I know I could do this by first going through and renaming everything with a prefix and then renaming it back again (ie, rename File.Jpg to xFile.Jpg and then a second rename to strip that x off and rename lowercase to file.jpg) however I find this approach a bit messy and would prefer to do it all in one pass. Other than that, could I change the drive to ext4 without losing any files on it? The drive has a hell of a lot of stuff on there which is an archive of many years of files - I'd be absolutely gutted if I lost everything.
I'm working with an embedded Linux (Montavista 5.0). I want to allow users of my program to choose filenames with Unicode chars like the German All Unicode chars are visible inside the program (dialogs, buttons,...) and I can write Unicode chars into files and read them. But it is not possible for me to create a file with an Unicode filename! I can't write such Unicode chars in the shell! I set my locals to "de_DE.utf8". locale charmap says UTF-8! But when I try
Every Unicode char is writte to the shell in this way with a leading The same happens when I write such chars from my program to the shell with printf!
Suppose I have a variable called filename which contains the name of a file but the name does not contain an extension.
View 4 Replies View RelatedI know this is a rather odd question, but like in the old days you can get one drive bay desktop cases.
View 4 Replies View RelatedThe sort utility in Ubuntu 10.04 (Lucid) always sort by case-insensitive, just like if you specify --ignore-case to it. The two sort just give the same result:
[Code]....
But sometimes I want to sort by case-sensitive, so the upper-case letters come first, then lower-case letter.
i am trying to set up a couple of pages in some special directories URL...but i need it that if they type URL... for them also to go to the site and not to a 404
View 2 Replies View RelatedIs there a way to automatically append date to the filenames of the photos imported using shotwell or f-spot?
View 9 Replies View RelatedAs above can I turn Case Sensitivity off for terminal in linux?
View 3 Replies View Related