LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-15-2010, 05:52 PM   #1
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
cd // ????


I did this by accident and it actually took me to a directory with nothing in it. cd .. took me to root.

I did it in cygwin and did a listing, and it listed a file called 'hurricane' (after a significant delay) but couldn't access it. cd .. left me in the directory // though.

What's going on here?
 
Old 04-15-2010, 07:07 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
hurricane is the name of your Windows computer. On real Unixes, cd // should just take you to /.
 
Old 04-15-2010, 07:12 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
in cygwin and MinGW using cd to \\ ( or //) will take you to thew MS Windows C drive ( the default )

but this also depends on what you have listed in the "/etc/profile "
for ex in mingw or cygwin if i do this"
cd /src" i go to
C:\\ GnwWin32/Mingw/src

and if i do this
cd /
i go to
C:\\GnuWin32/Msys/home/john


what did you set the files to ???

Last edited by John VV; 04-15-2010 at 07:16 PM.
 
Old 04-16-2010, 09:19 AM   #4
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
I've mostly satisfied my curiosity here. I don't know why a Linux computer would want to take you to root when you go to // but call it // instead of just / ...some kind of backwards compatibility I guess?

Quote:
Originally Posted by AlucardZero View Post
hurricane is the name of your Windows computer. On real Unixes, cd // should just take you to /.
hurricane is actually not the network name of my windows computer, but I have a vague memory of putting that in somewhere. It doesn't really matter, I was just curious.

I looked in etc profile briefly, but didn't find any lines relating to this. Again, it doesn't really matter I was just curious.
 
Old 04-16-2010, 09:33 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by davidstvz View Post
I've mostly satisfied my curiosity here. I don't know why a Linux computer would want to take you to root when you go to // but call it // instead of just / ...some kind of backwards compatibility I guess?
Probably just convenience. "//" anywhere in a path cannot be valid so most (all?) programs simply silently treat it as "/". Hey -- we bad typists need all the help we can get!
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:02 PM.

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