LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-24-2011, 01:13 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
Difference in cd /etc and cd etc ?


hi,
I am using red hat Linux 4. I uninstall my my old squid and install new squid 2.6. The thing which I want to clear is the location where squid is installed is


[root@myserver squid-2.6.STABLE22]#ls usr/local/squid/
bin etc libexec man sbin sahre var

if I use # cd /etc and take the list then it will show all things in the etc (configuration files) but If I take it with out slash # cd etc then it show me squid.conf file.

Kindly guide me the logic in it .With cd /etc and cd etc what is the difference ?

thanks
garden
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-24-2011, 01:46 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
/etc is an absolute path.
etc is a relative one.

The first example changes to etc under the directory / (i.e. the top of the filesystem tree), while the second changes to etc under the current directory.

Last edited by Nylex; 03-24-2011 at 03:31 AM.
 
2 members found this post helpful.
  


Reply

Tags
directory, relative



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
LXer: Making a Difference; Selling a Difference LXer Syndicated Linux News 0 09-23-2010 05:00 AM
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 04:26 AM
difference between *.ko and *.so alenD Linux - Newbie 10 11-09-2007 09:50 AM
difference between df -k and du -s Prasun1 Linux - General 3 06-22-2005 06:07 PM
Difference? Jongi Linux - Newbie 4 08-22-2003 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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