LinuxQuestions.org
Visit Jeremy's Blog.
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 09-11-2004, 06:06 PM   #1
Fascistchicken
Member
 
Registered: Jul 2003
Location: hellifniknow
Distribution: slackware for chickens
Posts: 182

Rep: Reputation: 30
how do i escape a / ???


how do you escape a \ (forward slash character) in a file name?
 
Old 09-11-2004, 06:10 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
With a backslash?

But how did you manage to create such abomination
of a file-name? :)


Cheers,
Tink
 
Old 09-11-2004, 06:12 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Or put quotes around it might also work??
 
Old 09-11-2004, 06:56 PM   #4
Fascistchicken
Member
 
Registered: Jul 2003
Location: hellifniknow
Distribution: slackware for chickens
Posts: 182

Original Poster
Rep: Reputation: 30
old dos disks
 
Old 09-11-2004, 07:01 PM   #5
Fascistchicken
Member
 
Registered: Jul 2003
Location: hellifniknow
Distribution: slackware for chickens
Posts: 182

Original Poster
Rep: Reputation: 30
i mean forward slash sorry

Last edited by Fascistchicken; 09-11-2004 at 07:02 PM.
 
Old 09-11-2004, 08:11 PM   #6
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
You cannot....

It is not possible to create a file with a / in it.

Why do you *need* a file like this?

Edit: I suppose you want to know how I am sure of this.

All filenames are passed to the kernel. The kernel has to find the inode associated with the filename. It does its own parsing... it ALWAYS interperts a "/" as a break between a directory and file. The name "foo/man" can never be a file because it will ALWAYS be seen by the kernel as file man in the directory foo. You cannot override this behavior without going to extremes and even then the file will be completely useless as every utility will be unable to find it.

Extreme measures: umounting the partition and physically manipulating the contents of a directory file... very dangerous and stupid.

Last edited by frob23; 09-11-2004 at 08:19 PM.
 
Old 09-11-2004, 08:53 PM   #7
Fascistchicken
Member
 
Registered: Jul 2003
Location: hellifniknow
Distribution: slackware for chickens
Posts: 182

Original Poster
Rep: Reputation: 30
on old dos program install disks 'they' made f'ed directories and files so youd have trouble installing,copy without the original disks
they have chars like ascii 13 or so in them
so i was wondering
 
Old 09-11-2004, 09:37 PM   #8
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Are you trying to install the program or just copy the disk?

What exactly are we trying to do here?
 
Old 09-11-2004, 10:10 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,289

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
One other way to deal with this is that emacs has a directory editor mode. Do 'emacs <parent directory> and it should open in directory editor mode (not sure if it will work on FAT, but worth a try). Be carefull in there, but you ought to be able to at least rename the file. You'll need to google.check documentation for more details.
 
Old 09-11-2004, 11:54 PM   #10
Fascistchicken
Member
 
Registered: Jul 2003
Location: hellifniknow
Distribution: slackware for chickens
Posts: 182

Original Poster
Rep: Reputation: 30
i was actually going to make a lil floppy iso and then try to mount it as a virtual dos a:
and install from there with dosemu
id say a little more but i dont have the disks at hand
 
Old 09-12-2004, 11:28 AM   #11
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Quote:
Originally posted by btmiller
One other way to deal with this is that emacs has a directory editor mode. Do 'emacs <parent directory> and it should open in directory editor mode (not sure if it will work on FAT, but worth a try). Be carefull in there, but you ought to be able to at least rename the file. You'll need to google.check documentation for more details.
Have you actually tried this?

You cannot modify a directory through ANYTHING but the operating system. It pretends to be a file but you cannot open it for writing... never... no matter who you are (not even root) or what permissions it has.

All attempts to modify a directory must be made through system calls... and every system call is going to resolve that "/".

If you have gotten this to work... I would love if you would give me a detailed tutorial on how to do it. I am very interested... it might come in useful. Note: I firmly believe this is not possible without editing the raw disk -- below the level of filesystems and operating systems...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Escape character ? juanb Linux - Newbie 2 08-31-2004 10:03 AM
Escape! Wind0wR3fuge Linux - Newbie 6 07-11-2004 03:00 AM
escape sequence help in C name_in_use450 Linux - General 6 07-01-2004 09:23 AM
The Great Escape Treefrog Linux - Software 6 11-11-2003 06:56 AM
disable escape def1014 Linux - Security 1 04-16-2002 04:02 PM

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

All times are GMT -5. The time now is 12:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration