LinuxQuestions.org
Register a domain and help support LQ
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 12-19-2011, 11:52 AM   #1
vagmztp
LQ Newbie
 
Registered: Oct 2011
Posts: 22

Rep: Reputation: Disabled
Can you tell me why cd doesn't work like the MAN pages say?


Ok, here is my system information:
(850)==> uname -a
Linux lgofgtapp01 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

Red Hat Enterprise Linux Server release 5.5 (Tikanga)

Yes, it's me again! I'm having difficulty with some scripts and can't understand why.

Here's the problem:
I start out in my home directory:
lgofgtapp01:car0071:[/home/car0071]
(853)==> ll
total 32
drwxrwxrwx 3 car0071 harbprd 4096 Nov 9 14:38 edi
-rwxrwxrwx 1 car0071 harbprd 101 Nov 28 15:22 edi_env_sh
-rwxrwxrwx 1 car0071 harbprd 1510 Nov 29 16:52 gxs_sftp_send_all.ftp
-rwxrwxrwx 1 car0071 harbprd 271 Nov 9 14:43 start_tandsql.sh
-rwxrwxrwx 1 car0071 harbprd 159 Nov 9 15:07 testcurl.sh
-rwxr-xr-x 1 car0071 harbprd 2110 Dec 1 13:53 testgxssend.sh
-rwxr-xr-x 1 car0071 harbprd 1883 Dec 14 15:58 testscript2.sh
-rwxrwxrwx 1 car0071 harbprd 2110 Dec 2 14:36 testscript.sh
lgofgtapp01:car0071:[/home/car0071]
(854)==> cd /edi/corp_edi/mb/edi_pin/fiberglass/830
-ksh: cd: /edi/corp_edi/mb/edi_pin/fiberglass/830: [No such file or directory]
lgofgtapp01:car0071:[/home/car0071]
(855)==> cd edi/corp_edi/mb/edi_pin/fiberglass/830
lgofgtapp01:car0071:[/home/car0071/edi/corp_edi/mb/edi_pin/fiberglass/830]


If I say cd /edi it doesn't work but if I say cd edi it does work. The MAN pages say that if it starts with a / then it doesn't use the CDPATH. Doesn't say it won't work!
 
Old 12-19-2011, 11:57 AM   #2
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,050

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
The correct syntax for a sub-folder of your /home folder is:

Code:
cd ~/edi/corp_edi/mb/edi_pin/fiberglass/830
 
1 members found this post helpful.
Old 12-19-2011, 12:08 PM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by vagmztp View Post
If I say cd /edi it doesn't work but if I say cd edi it does work. The MAN pages say that if it starts with a / then it doesn't use the CDPATH. Doesn't say it won't work!
/ is the root of the filesystem tree. By "/edi" you're asking to change to the directory "edi" in "/", which doesn't exist. When you write "edi", you're referring to "edi" in the current directory. You probably want to look up relative and absolute paths.
 
1 members found this post helpful.
Old 12-19-2011, 01:45 PM   #4
vagmztp
LQ Newbie
 
Registered: Oct 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Lightbulb

Thank you for the information and explanation!
 
  


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
Pressing 'j' doesn't work reading man pages with xterm, cola Debian 5 12-22-2009 03:57 AM
man pages BlinkingSpirit Linux - Newbie 10 08-05-2009 08:20 AM
Man pages as root doesn't work vharishankar Slackware 8 04-04-2006 12:13 PM
"man' doesn't want to work anymore ... why ??? sys7em Slackware 3 02-12-2005 04:58 PM
man pages dont work.. chlee General 2 06-07-2002 04:20 AM


All times are GMT -5. The time now is 07:10 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