Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-24-2011, 02:13 AM   #1
Registered: Oct 2004
Location: LH
Posts: 610

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

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 ?

Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-24-2011, 02:46 AM   #2
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 04:31 AM.
2 members found this post helpful.


directory, relative

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

All times are GMT -5. The time now is 11:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration