Results 1 to 10 of 10
I want to make I directory with the '/' prepended in it's name ie if i created a dir vickey before now i would like to create the same dir ...
- 05-11-2009 #1
mkdir with /dirname prepended
I want to make I directory with the '/' prepended in it's name ie if i created a dir vickey before now i would like to create the same dir with '/' prepended now. How do i accomplish that ??
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-11-2009 #2
Its not possible, because "/" is not allowed in file/directory name
but "\" is allowed.
- 05-11-2009 #3
isn't there any way to name it like that??
like this mkdir \/directory ..
I tried like that but it creates the dir in the /Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-11-2009 #4
what is exact usage if '\' in naming dir/file???
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-12-2009 #5
'\' is used to ovverride the meaning of a character or symbol.
e.g.
If you type command
$ mkdir Audio Projects
It will create 2 directories, Audio and Projects
to ovverride meaning of space and use it as character '\' is added.
$ mkdir Audio\ Projects
Which will create one directory of name 'Audio Project'
same way $ mkdir "Audio Projects"
However '\/' reverse slashing wont work, / is not allowed in any file/folder name.
- 05-18-2009 #6
hey posting after a long time!!
I opened the man page of cd . There is a option -L , just few lines above that I see a statement which says "If dir begins with a slash(/).....". Now this means that dir can have a '/' prepended .Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-18-2009 #7Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Not really. Read it carefully:
The directory operand is just that, an operand specified on the command line. Slashes can be used on that operand, but they have a special meaning. What you want to do is simply impossible as far as I know at file system level. So it doesn't really matter which useland tools you use, Linux won't let you this. That is, unless you are willing to do some -I suspect very heavy- patching on your kernel sources.If the directory operand begins with a slash character
- 05-18-2009 #8
thanks for replying
I use RHEL5 and the man pages say exactly as what I have posted. Which OS are you using??Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-18-2009 #9Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
- 05-19-2009 #10
Man pages are mostly not different but basic linux things are nearly same in all distros.


Reply With Quote
