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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-26-2011, 05:38 AM
lee
 
Default Accented chars in filenames issue

Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> writes:

> William Hopkins wrote:
>> You should be able to trust rm, at least. Just add -i if you're paranoid.
>
> And if you are more paranoid, fully path rm to ensure no alias is
> changing anything.

There are at least three things involved: rm, the shell and the user. If
the shell would do some unexpected extensions, I might get unexpected
results: that's the reason why the file name is defined in the program
and not handed over on the commandline. Both the shell and rm are
probably fine and work as they are supposed to. The user may easily
overlook something. It wasn't something I could have tried out in
advance very well, and writing the program took only a few
minutes. Better save than sorry ...


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 8762ntywxu.fsf@yun.yagibdah.de">http://lists.debian.org/8762ntywxu.fsf@yun.yagibdah.de
 
Old 06-26-2011, 09:25 AM
Tom Furie
 
Default Accented chars in filenames issue

On Sat, Jun 25, 2011 at 03:20:13PM +1000, Scott Ferguson wrote:
> On 25/06/11 10:16, lee wrote:

> > To give a silly example, a file named "-rf *" or "rm -rf *"
>
> I defy you to create a file with those name ;-p
> NOTE: I've tried. No point in it just being an untested opinion.

You can't have tried very hard then: 'touch -- "-rf *"'.

> > It's only common sense not to create file names that are likely to yield
> > unexpected results.
>
> Agreed - but *as it's not possible* my agreement is worthless. It also
> belies the point of UTF.

See above.

Cheers,
Tom

--
Man is the best computer we can put aboard a spacecraft ... and the
only one that can be mass produced with unskilled labor.
-- Wernher von Braun
 
Old 06-26-2011, 10:43 AM
Scott Ferguson
 
Default Accented chars in filenames issue

On 26/06/11 09:17, William Hopkins wrote:
> On 06/25/11 at 04:33pm, Scott Ferguson wrote:

<snipped>

> OK, so the files are being created, and your FS can handle the characters, but
> somehow the characters aren't being translated. So it's not an issue with your
> filesystem, it's an issue with the filesystem the original files are on. I
> assume that's NTFS? Can you try mounting it and moving a file with mv ?

Unfortunately that happened several years ago with some elses portable
drive - I only noticed the problem when moving the music collection from
ext3 to ext4 - the system kept coming up with "not found" messages when
attempting to move filenames which had ISOcharacter set accented
characters.

Fortunately I've managed to rename them using Picard and MusicBrainz -
there's far too many to do by hand.

This thread was created by someone else with a similar problem - so the
solution might be more use to them. I'm curious as to how it happened so
I can avoid it in the future though. Especially as I increasingly come
across people using the old non-UTF character sets for files.

What I should do is create some rules so that when I mount ntfs and fat
volumes in the future the problem is avoided... any suggestions'd be
appreciated.


Cheers
--
You know we armed Iraq. I wondered about that too, you know.
During the Persian Gulf war, those intelligence reports would come out:
"Iraq: incredible weapons – incredible weapons."
"How do you know that?" "Uh, well … we looked at the receipts.
But as soon as that check clears, we're goin' in.
What time's the bank open? Eight? We're going in at nine.
~ Bill Hicks on the Gulf War


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E070D61.8010101@gmail.com">http://lists.debian.org/4E070D61.8010101@gmail.com
 
Old 06-26-2011, 11:45 AM
Scott Ferguson
 
Default Accented chars in filenames issue

On 26/06/11 19:25, Tom Furie wrote:
> On Sat, Jun 25, 2011 at 03:20:13PM +1000, Scott Ferguson wrote:
>> On 25/06/11 10:16, lee wrote:

<snipped>

> You can't have tried very hard then: 'touch -- "-rf *"'.
>
<snipped>
>
> Cheers,
> Tom
>

You are (also) correct.
Turns out there's a number of ways to do that.

What does the "--" do??
Both:-
$ touch "-rf *"
and:-
$ touch -- "-rf *"
work - so "--" doesn't "appear" to do anything, yet it produces no
error. Strange - I'd expect an error at least.

Cheers

--
You know we armed Iraq. I wondered about that too, you know.
During the Persian Gulf war, those intelligence reports would come out:
"Iraq: incredible weapons – incredible weapons."
"How do you know that?" "Uh, well … we looked at the receipts.
But as soon as that check clears, we're goin' in.
What time's the bank open? Eight? We're going in at nine.
~ Bill Hicks on the Gulf War


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E071BED.3050501@gmail.com">http://lists.debian.org/4E071BED.3050501@gmail.com
 
Old 06-26-2011, 11:45 AM
Scott Ferguson
 
Default Accented chars in filenames issue

On 26/06/11 19:25, Tom Furie wrote:
> On Sat, Jun 25, 2011 at 03:20:13PM +1000, Scott Ferguson wrote:
>> On 25/06/11 10:16, lee wrote:

<snipped>

> You can't have tried very hard then: 'touch -- "-rf *"'.
>
<snipped>
>
> Cheers,
> Tom
>

You are (also) correct.
Turns out there's a number of ways to do that.

What does the "--" do??
Both:-
$ touch "-rf *"
and:-
$ touch -- "-rf *"
work - so "--" doesn't "appear" to do anything, yet it produces no
error. Strange - I'd expect an error at least.

Cheers

--
You know we armed Iraq. I wondered about that too, you know.
During the Persian Gulf war, those intelligence reports would come out:
"Iraq: incredible weapons – incredible weapons."
"How do you know that?" "Uh, well … we looked at the receipts.
But as soon as that check clears, we're goin' in.
What time's the bank open? Eight? We're going in at nine.
~ Bill Hicks on the Gulf War


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E071BED.3050501@gmail.com">http://lists.debian.org/4E071BED.3050501@gmail.com
 
Old 06-26-2011, 02:55 PM
William Hopkins
 
Default Accented chars in filenames issue

On 06/26/11 at 09:45pm, Scott Ferguson wrote:
> On 26/06/11 19:25, Tom Furie wrote:
> > On Sat, Jun 25, 2011 at 03:20:13PM +1000, Scott Ferguson wrote:
> >> On 25/06/11 10:16, lee wrote:
>
> <snipped>
>
> > You can't have tried very hard then: 'touch -- "-rf *"'.
> >
> <snipped>
> >
> > Cheers,
> > Tom
> >
>
> You are (also) correct.
> Turns out there's a number of ways to do that.
>
> What does the "--" do??

POSIX standard is for -- to signify end of options, so anything beyond that
cannot be processed as a switch/option.

,-----------
| Guideline 10:
| The first -- argument that is not an option-argument should be accepted as
| a delimiter indicating the end of options. Any following arguments should be
| treated as operands, even if they begin with the '-' character.
,-----------

--
Liam
 
Old 06-26-2011, 03:13 PM
Scott Ferguson
 
Default Accented chars in filenames issue

On 27/06/11 00:55, William Hopkins wrote:
> On 06/26/11 at 09:45pm, Scott Ferguson wrote:
>> On 26/06/11 19:25, Tom Furie wrote:
>>> On Sat, Jun 25, 2011 at 03:20:13PM +1000, Scott Ferguson wrote:
>>>> On 25/06/11 10:16, lee wrote:
>>
>> <snipped>
>> What does the "--" do??
>
> POSIX standard is for -- to signify end of options, so anything beyond that
> cannot be processed as a switch/option.
>
> ,-----------
> | Guideline 10:
> | The first -- argument that is not an option-argument should be accepted as
> | a delimiter indicating the end of options. Any following arguments should be
> | treated as operands, even if they begin with the '-' character.
> ,-----------
>

Thanks -- should prove very useful (much simpler safety than other
proposals). Also explains why it didn't throw an error.
I remember seeing it before (IRIX and AIX) but, um, don't think I'd ever
bothered to asking why :-(.

Cheers

--
You know we armed Iraq. I wondered about that too, you know.
During the Persian Gulf war, those intelligence reports would come out:
"Iraq: incredible weapons – incredible weapons."
"How do you know that?" "Uh, well … we looked at the receipts.
But as soon as that check clears, we're goin' in.
What time's the bank open? Eight? We're going in at nine.
~ Bill Hicks on the Gulf War


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E074C8E.5000303@gmail.com">http://lists.debian.org/4E074C8E.5000303@gmail.com
 
Old 06-27-2011, 08:53 AM
Raffaele Morelli
 
Default Accented chars in filenames issue

2011/6/24 Camaleón <noelamac@gmail.com>

On Fri, 24 Jun 2011 12:05:17 +0200, Raffaele Morelli wrote:



> I am experiencing serious problems with my external HD, I can't

> create/write filenames containing accented chars, especially when

> copying music from my amarok collection (as you can guess a lor of

> brazilian, french and italian music has plenty of accented chars in

> filenames).



(...)



For this kind of weird issues, what it usually helps is mounting the

device manually (with "mount" command) and trying to write a file in

there, also, from command line. Hopefully the error you get can shed some

light on the problem.



Greetings,



--

Camaleón




the device is being mounted correctly so no error is reported, but I still can't create/write filenames with accented chars.
-r
 
Old 06-27-2011, 09:42 AM
Chris Davies
 
Default Accented chars in filenames issue

>>> To give a silly example, a file named "-rf *" or "rm -rf *"

lee <lee@yun.yagibdah.de> wrote:
>> I defy you to create a file with those name ;-p

touch './-rf *'

The ./ prefix is the key to removing it afterwards, too.
Chris


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 3uvld8x5q6.ln2@news.roaima.co.uk">http://lists.debian.org/3uvld8x5q6.ln2@news.roaima.co.uk
 
Old 06-27-2011, 11:19 AM
Camaleón
 
Default Accented chars in filenames issue

On Mon, 27 Jun 2011 10:53:55 +0200, Raffaele Morelli wrote:

> 2011/6/24 Camaleón <noelamac@gmail.com>
>
>> On Fri, 24 Jun 2011 12:05:17 +0200, Raffaele Morelli wrote:
>>
>> > I am experiencing serious problems with my external HD, I can't
>> > create/write filenames containing accented chars, especially when
>> > copying music from my amarok collection (as you can guess a lor of
>> > brazilian, french and italian music has plenty of accented chars in
>> > filenames).
>>
>> (...)
>>
>> For this kind of weird issues, what it usually helps is mounting the
>> device manually (with "mount" command) and trying to write a file in
>> there, also, from command line. Hopefully the error you get can shed
>> some light on the problem.

> the device is being mounted correctly so no error is reported, but I
> still can't create/write filenames with accented chars.

Put here the output you get when you try to save a file with accented
characters on its filename, but do it from command line, do not use GUI
applications because sometimes, more than helping, quietly silence the
underlaying problem.

For instance:

sm01@stt008:~$ echo sample > áéíóú.txt
sm01@stt008:~$ file áéíóú.txt
áéíóú.txt: ASCII text
sm01@stt008:~$ cat áéíóú.txt
sample

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.06.27.11.19.50@gmail.com">http://lists.debian.org/pan.2011.06.27.11.19.50@gmail.com
 

Thread Tools




All times are GMT. The time now is 10:45 AM.

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