LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-04-2009, 09:37 AM   #1
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Rep: Reputation: 16
Can't create a file with :: in its name


At least, I think that's the problem. I have a file called "pkg::create.n" and I need to back it up. But neither the commandline (I tried using cp, mv, touch, even creating a hard link) nor Thunar file manager will let me create a file with that name. I can create one called "pkg:create.n", but it's not a solution.

Using Xubuntu 9.04, BTW.
 
Old 08-04-2009, 09:48 AM   #2
Chromezero
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Slackware, RHEL, others
Posts: 470

Rep: Reputation: 40
I was just able to create a file with this name and then successfully copied it. You'll need to put quotation marks around it to do so. Like this...
Code:
mv "pkg::create.n" "pkg::create.n2"
 
Old 08-04-2009, 09:51 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
On my CentOS 5 box I was able to create the file with that name with a simple touch command.

I can't see any reason that it shouldn't work on any Linux distro.

Not sure what Thunar is - it may have an issue with using : in names.

However, I would NOT actually want files with : in the name because : is used as a separator for many PATH style variables and within many configuration files as a delimiter. If for example you made a directory with that name you'd never be able to add it to your PATH or use it for a user's home directory because the : would confuse things.
 
Old 08-04-2009, 10:28 AM   #4
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
Oh, I found the problem. See, I'm running Linux inside a virtual machine, which has a shared folder with its Windows XP host. It's Windows who doesn't accept the :: in the name. Thanks anyway.

And Thunar is Xfce's (or at least Xubuntu's) file manager.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot create regular file ...: text file busy laode Linux - General 4 11-27-2012 01:56 AM
unable to create file & folder on fat32 file system while similiar other drives work sumeet inani Linux - Newbie 1 06-27-2009 11:46 AM
Can't create folder in file system using file browser aarav2306 Linux - Newbie 5 03-03-2009 01:36 AM
Create File Shell Syntax and pass data to the file FirstBorn Linux - General 22 07-31-2008 09:48 PM
how to create a new file including content from reading another file !? silverhand Programming 2 10-06-2007 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration