FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 09-01-2012, 07:50 PM
Joe Zeff
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On 09/01/2012 12:27 PM, Fernando Cassia wrote:

On Sat, Sep 1, 2012 at 4:20 PM, Joe Zeff<joe@zeff.us> wrote:

>Have you tried putting quotation marks around the name to keep it from being
>expanded?

Yes, tried everything... wildcards, enclosing it, rename first, move,
rename with wildcards.... nothing works. :-(


OK, well, it was worth asking, JIC.

See if you can find a LiveCD that includes emacs. (Yes, specifically
emacs.) Open up the directory from a command line in dired mode. (You
do this by specifying the directory on the command line instead of a
file.) What you'll see is a directory listing *that you can edit.*
Edit the file name by removing/changing the question mark, and do any
other tidying up you think needed. Save, exit and Bjorn
Stronginthearm's your uncle.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-01-2012, 07:55 PM
Fernando Cassia
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On Sat, Sep 1, 2012 at 4:50 PM, Joe Zeff <joe@zeff.us> wrote:
> See if you can find a LiveCD that includes emacs.

Thanks for the help and suggestion. IŽm sure IŽll end up fixing this
on Monday when I return and have access to the drive from my F17 Linux
machine.

Right now, IŽm stuck with a XPSP3 netbook for the weekend.

The idea of my post, however, was to raise a red flag about files with
invalid names being happily written by Linux NTFS-3G... (the files
ORIGINATED on the F17 box, as I plugged the NTFS external drive there,
and copied a bunch of files using Midnight commander to it, which are
now the files that are giving me trouble).

That is to say, I wrote no files to that drive from XP, always from Fedora 17.
The only time I did some writing on that external drive from windows
was for formatting it NTFS, at the time I purchased it.

FC
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-01-2012, 08:13 PM
Roberto Ragusa
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On 09/01/2012 09:20 PM, Joe Zeff wrote:
> On 09/01/2012 11:28 AM, Fernando Cassia wrote:
>> Now I connect the external usb NTFS-formatted drive to my old xpsp3
>> running netbook and stumble upon a file (a folder actually under
>> .cachevlcartartistalbumThe RaptureHow Deep is Your Love?
>> that ABSOLUTELY canŽt be removed from WinXP, as windows thinks
>> question marks are an "invalid character" in a file or folder name.
>
> Of course it's an invalid character for XP, just as it is for Linux. The question mark is a wildcard, used to represent one unknown character, just as an asterisk is used to represent any number of unknown characters. Thus, test?.txt will match test1.txt or test2.txt but not test12.txt. Have you tried putting quotation marks around the name to keep it from being expanded?

You say it is invalid, then you say you have to escape it.
It is perfectly valid in Linux. You just have to escape it to avoid
confusion inside the shell (no issue with GUI programs).

[root@thinkpad ~]# cd /tmp
[root@thinkpad tmp]# mkdir tests
[root@thinkpad tmp]# cd tests
[root@thinkpad tests]# date >ok?
[root@thinkpad tests]# ls -l
total 4
-rw-r--r-- 1 root root 30 Sep 1 22:02 ok?
[root@thinkpad tests]# cat ok?
Sat Sep 1 22:02:45 CEST 2012
[root@thinkpad tests]# rm ok?
rm: remove regular file `ok?'? y
[root@thinkpad tests]# ls -l
total 0

The only character forbidden character is the slash (obviously) and I'm not sure about
the 0x00 byte (which would make a mess with C strings).
You can also use invalid utf8; in fact the filesystem does not care about
charset encoding, file names are sequences of bytes.
[Linus personally rejected the proposal to associate an encoding to a filesystem
(and he did it with good reasons, I'd say)]

The problem on Windows can probably solved by using the command prompt and
something tricky, like recursively deleting the parent directory of the file.

Best regards.
--
Roberto Ragusa mail at robertoragusa.it
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-01-2012, 08:26 PM
Joe Zeff
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On 09/01/2012 01:13 PM, Roberto Ragusa wrote:

You say it is invalid, then you say you have to escape it.
It is perfectly valid in Linux. You just have to escape it to avoid
confusion inside the shell (no issue with GUI programs).


Not quite. I know that in Linux you can get around some invalid
characters, such as spaces, by quoting the name so that the shell knows
to pass it on to the program as one string so I suggested trying it in
XP to see if it worked.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-01-2012, 08:49 PM
Sam Varshavchik
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

Joe Zeff writes:


On 09/01/2012 01:13 PM, Roberto Ragusa wrote:

You say it is invalid, then you say you have to escape it.
It is perfectly valid in Linux. You just have to escape it to avoid
confusion inside the shell (no issue with GUI programs).


Not quite. I know that in Linux you can get around some invalid characters,
such as spaces, by quoting the name so that the shell knows to pass it on to
the program as one string so I suggested trying it in XP to see if it worked.


There's nothing equivalent to "shell" in MS Windows. The command prompt is
a joke.


MS Windows has a separate API for filename wildcard matching, and file
operations. The APIs that deal with opening, closing files ban wildcard
characters in the filename. An application is expected to use the wildcard
matching API calls to expand the wildcards, before opening or closing them.


You cannot have filenames containing wildcard characters in MS-Windows. I
do agree that NTFS and FAT drivers should reject filenames containing ?,
*, :, and whatever else MS Windows barfs on.



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-01-2012, 08:59 PM
Fernando Cassia
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On Sat, Sep 1, 2012 at 5:49 PM, Sam Varshavchik <mrsam@courier-mta.com> wrote:
> You cannot have filenames containing wildcard characters in MS-Windows. I do
> agree that NTFS and FAT drivers should reject filenames containing ?, *, :,
> and whatever else MS Windows barfs on.

exactly my point. Where should I write this bug report on?
tuxeraŽs or fedoraŽs?

http://tuxera.com/forum/viewforum.php?f=2&sid=7d15e42211323f2d62370e1ee6f1 8896

FC
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-01-2012, 09:13 PM
Ian Malone
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On 1 September 2012 21:26, Joe Zeff <joe@zeff.us> wrote:
> On 09/01/2012 01:13 PM, Roberto Ragusa wrote:
>>
>> You say it is invalid, then you say you have to escape it.
>> It is perfectly valid in Linux. You just have to escape it to avoid
>> confusion inside the shell (no issue with GUI programs).
>
>
> Not quite. I know that in Linux you can get around some invalid characters,
> such as spaces, by quoting the name so that the shell knows to pass it on to
> the program as one string so I suggested trying it in XP to see if it
> worked.
>

Not invalid, just not a good idea to use them (or anything that gets
interpreted by the shell). I always avoid spaces in anything that
needs to be machinable.

--
imalone
http://ibmalone.blogspot.co.uk
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-01-2012, 09:25 PM
Frank Cox
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On Sat, 01 Sep 2012 13:26:10 -0700
Joe Zeff wrote:

> Not quite. I know that in Linux you can get around some invalid
> characters, such as spaces, by quoting the name so that the shell knows
> to pass it on to the program as one string so I suggested trying it in
> XP to see if it worked.

What about the rename command in C?

#include <stdio.h>
int main(void)
{
rename("thisfile","thatfile");
return 0;
}

Then you're not going through a command shell.

--
MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-02-2012, 12:03 AM
Tim
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On Sat, 2012-09-01 at 16:27 -0300, Fernando Cassia wrote:
> And IŽm afraid of running CHKDSK because I have tons of stuff there
> not backed up, and it wouldnŽt be the first time that CHKDSK decides
> "oh, thereŽs a lot of invalid dirs in there, IŽll now happily lose
> your data by mangling folder names and destroying the folders layout
> while claiming to fix things". ;-)

Or just outright deleting them. I've seen it do that.

--
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 09-02-2012, 12:12 AM
John Wendel
 
Default Fedora NTFS-3G happily writes files with invalid chars in filename?

On 09/01/2012 12:20 PM, Joe Zeff wrote:

On 09/01/2012 11:28 AM, Fernando Cassia wrote:

Now I connect the external usb NTFS-formatted drive to my old xpsp3
running netbook and stumble upon a file (a folder actually under
.cachevlcartartistalbumThe RaptureHow Deep is Your Love?
that ABSOLUTELY canŽt be removed from WinXP, as windows thinks
question marks are an "invalid character" in a file or folder name.


Of course it's an invalid character for XP, just as it is for Linux.
The question mark is a wildcard, used to represent one unknown
character, just as an asterisk is used to represent any number of
unknown characters. Thus, test?.txt will match test1.txt or test2.txt
but not test12.txt. Have you tried putting quotation marks around the
name to keep it from being expanded?


Actually, '?' is not "an invalid character" in a Linux filename. Only
"/" and the NULL character (0) are invalid in filenames.


Regards,

John


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 03:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org