LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 07-25-2009, 10:45 AM   #1
Jinouchi
Member
 
Registered: Jul 2007
Location: WI, USA
Distribution: Debian, Lenny
Posts: 111

Rep: Reputation: 19
Special characters in file names


Ok, I feel really dumb, I thought I know how to do this, but it's not working. I'm trying to make some filenames with some odd characters in them (I'm renaming tracks from Linkin Park's Reanimation album - If you've heard this CD you'll know where my problem is ).

Example:
Code:
$ mv track06.cdda.wav '06_P5hng_Me_Aw*y'
mv: cannot move `track06.cdda.wav' to a subdirectory of itself, `06_P5hng_Me_Aw*y'
I've also tried using the escaping method (using a "\" before the asterisk) but that yielded the same result. Tried this with different filenames with different special chars and none of them have worked... What am I missing?
 
Old 07-25-2009, 11:06 AM   #2
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,577

Rep: Reputation: Disabled
Code:
jdkaye@Attila:~$ mkdir "test*name"
jdkaye@Attila:~$ cd "test*name"
jdkaye@Attila:~/test*name$ pwd
/home/jdkaye/test*name
jdkaye@Attila:~/test*name$
There you go.
cheers,
jdk
 
Old 07-25-2009, 11:08 AM   #3
Jinouchi
Member
 
Registered: Jul 2007
Location: WI, USA
Distribution: Debian, Lenny
Posts: 111

Original Poster
Rep: Reputation: 19
Already tried the double quotes...

Code:
$ mkdir "test*dir"
mkdir: cannot create directory `test*dir': Invalid argument
 
Old 07-25-2009, 11:18 AM   #4
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,577

Rep: Reputation: Disabled
Quote:
Originally Posted by Jinouchi View Post
Already tried the double quotes...

Code:
$ mkdir "test*dir"
mkdir: cannot create directory `test*dir': Invalid argument
Very strange indeed. And we're both using Debian (although I'm in Squeeze). I'm doing this from Konsole using bash, what about you?
Code:
jdkaye@Attila:~$ mkdir "test*dir"
jdkaye@Attila:~$ cd "test*dir"
jdkaye@Attila:~/test*dir$ pwd
/home/jdkaye/test*dir
Even with the identical folder name it works. I also tried doing with the backslash (\) and that works too.
cheers,
jdk

Last edited by jdkaye; 07-25-2009 at 11:22 AM.
 
Old 07-25-2009, 11:22 AM   #5
Jinouchi
Member
 
Registered: Jul 2007
Location: WI, USA
Distribution: Debian, Lenny
Posts: 111

Original Poster
Rep: Reputation: 19
I'm using "Terminal" (Gnome).

...Well, that IS interesting. I switched to the virtual console (I think that's what you call it - by pressing Ctrl+alt+F[2]) and I tried it and it worked just fine. I guess I'll just use that from now on. I prefer that over a GUI terminal anyway...
 
Old 07-25-2009, 11:25 AM   #6
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,577

Rep: Reputation: Disabled
Maybe the gnome terminal has some weird configuration. I use kde myself so I can't test it for you.
cheers,
jdk
 
Old 07-25-2009, 11:30 AM   #7
Jinouchi
Member
 
Registered: Jul 2007
Location: WI, USA
Distribution: Debian, Lenny
Posts: 111

Original Poster
Rep: Reputation: 19
OH, I just figured it out. I was trying to create the original file on a FAT32 external HDD. The reason it worked the second time, "test*dir", is because I was in my home dir, and therefore on an ext3 filesystem. I realized this when I went back to the virtual terminal and tried the original file again and it still didn't work.

/Facepalm. Oh well, problem solved =)
 
Old 07-25-2009, 11:48 AM   #8
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,577

Rep: Reputation: Disabled
Live and learn
jdk
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing file with special characters rsashok Linux - General 4 02-09-2010 04:08 PM
converting linux (reiserfs) data to NTFS (file names contain special characters) jefffq Linux - General 2 03-08-2009 03:07 PM
Special File Names alkos333 Slackware 3 12-31-2008 01:01 AM
How to remove file with name containing only special characters abhisheknayak Linux - Newbie 5 07-04-2008 10:53 AM
Use of special characters in .netrc file jlarsen Linux - General 3 08-01-2007 10:12 AM


All times are GMT -5. The time now is 11:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration