Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Spaces and paranthesis in a file name

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Spaces and paranthesis in a file name

#1 Post by Repesorsa »

For example, I do have a file with a name like this: al5. (r) 2010 same as al5.[space][space](r)[space]2010

Now, I'm tryin to change the name of file with mv command to acelemon:

mv -T al5.\ \(r\)\ 2010 acelemon

linux is tryin to see the new filename as an operand.

What kind of character should I use to make the change of filename working?

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Spaces and paranthesis in a file name

#2 Post by L_V »

Code: Select all

mv 'al5. (r) 2010' acelemon

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Spaces and paranthesis in a file name

#3 Post by Repesorsa »

Don't work.

Bash says:

...can not be read: There is no file or directory

Repesorsa
Posts: 22
Joined: 2018-03-24 10:21

Re: Spaces and paranthesis in a file name

#4 Post by Repesorsa »

Ok, now I found out that after the name there were two spaces more. Problem solved!

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Spaces and paranthesis in a file name

#5 Post by debiman »

another idea (what i do more and more often):

Code: Select all

mv al<Tab><Tab> (completes to properly escaped filename) acelemon

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Spaces and paranthesis in a file name

#6 Post by arzgi »

debiman wrote:another idea (what i do more and more often):

Code: Select all

mv al<Tab><Tab> (completes to properly escaped filename) acelemon

And for us lazy ones, there is mc, which among other things, can open and rename files, which include spaces or specaial characters.

Post Reply